Historical proposal draft. Preserved working material. Claims of compliance, validation, authority, budget or partnerships in this historical draft are not established by publication. Current plans and evidence limits take precedence. Read current implementation options.
On this page

RESILIENCE-MESH Technical Interoperability Profile

Standard Identifier: RM-TIP-v1.0.0
Classification: Technical Standard / Vendor-Neutral Interoperability Specification
Target Jurisdictions: Western Australia (Water Corporation, DWER, Local Government Authorities) & National Scalability (Standards Australia WS-014 / IT-012)
Status: Authoritative Technical Standard


1. Scope, Purpose & Architectural Principles

1.1 Scope

This specification defines the vendor-neutral physical, network, cryptographic, and application-layer protocols governing the RESILIENCE-MESH framework. It establishes the mandatory interfaces, message formats, and hardware behaviors required to issue, authenticate, execute, and audit automated water-management directives across residential, municipal, and commercial irrigation infrastructure.

Under this standard, automated interventions are strictly confined to dedicated outdoor irrigation circuits. Under no circumstances does this profile permit, specify, or support remote actuation or restriction of potable drinking water, domestic indoor sanitation, critical medical supplies, or fire suppression systems.

1.2 Core Architectural Principles

  1. Physical Circuit Segregation: All edge actuation hardware operates strictly downstream of certified backflow prevention assemblies (AS/NZS 2845.1) on dedicated non-essential reticulation pipework. The potable drinking supply is mechanically untouched and air-gapped from electronic actuators.
  2. Zero-Trust Asymmetric Cryptography: Every command issued across any network transport is cryptographically signed using asymmetric keys (Ed25519 or ECDSA P-256) anchored in a three-tier Public Key Infrastructure (PKI). Symmetric shared secrets or unauthenticated local networks are prohibited for valve actuation.
  3. Transport Layer Decoupling: Message payload definitions are independent of underlying data link and physical layers. The identical logical command model functions deterministically across Cellular NB-IoT, LoRaWAN (Class A/C), BLE 5.x Coded PHY, Wi-Fi HaLow, and industrial wired RS-485.
  4. Autonomous Fail-Safe Operation: Edge hardware maintains deterministic state in the presence of communication loss, grid power outages, or backend service failures. Commands execute as time-bounded leases with mandatory hardware dead-man watchdogs ensuring automatic restoration to unrestricted operation.
  5. Zero Inbound Attack Surface: Edge devices expose no open inbound TCP or UDP listening ports on public or local network interfaces, operating exclusively via authenticated outbound connections, message queuing push notifications, or passive LPWAN receive windows.

2. Edge Hardware Topologies

RESILIENCE-MESH establishes four physical and electrical topologies (Types A through D) accommodating heterogeneous field conditions, existing equipment, and legal/structural constraints.

┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                RESILIENCE-MESH EDGE TOPOLOGY OVERVIEW                            │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘

 [TYPE A: Commercial Smart Controller Bridge]
  Utility Dispatch ──► [Cloud API / Local LAN] ──► Smart Controller ──► 24VAC Solenoids
  (Hunter Hydrawise, Rain Bird, Rachio, Matter 1.3+ Valve Cluster)

 [TYPE B: Certified Wireless Gateway + Solenoid Driver]
  Utility Dispatch ──► [NB-IoT / LoRaWAN / BLE] ──► Certified Gateway ──► 24VAC Triac / DC Latch
  (Dedicated Edge Node + Secure Element + Flow/Pressure Telemetry)

 [TYPE C: Retrofit C-Wire Relay & Inline Valve]
  Utility Dispatch ──► [LoRaWAN / NB-IoT / BLE] ──► Inline Interrupter ──► Breaks 24VAC C-Wire /
  (Normally-Closed Relay / AS/NZS WaterMark Motorized Ball Valve)         Inline Pipe Shutoff

 [TYPE D: Monitor-Only Non-Intrusive Sensing]
  Utility Dispatch ◄── [LoRaWAN / BLE Uplink]  ◄── Ultrasonic Clamp   ──► No Actuation
  (Transit-Time Ultrasonic Meter / Optical Pulse Meter Pickup)            (Signed Breach Records)

2.1 Topology Type A: Smart Controller API Integration

2.2 Topology Type B: Certified Dedicated Wireless Gateway + Solenoid Driver

2.3 Topology Type C: Retrofit Inline Shutoff Relay / Valve for Legacy Controllers

2.4 Topology Type D: Monitor-Only Non-Intrusive Sensing

2.5 Comparative Edge Hardware Topology Matrix

Architectural Parameter Type A (Smart Bridge) Type B (Dedicated Gateway) Type C (Retrofit Interrupter) Type D (Monitor-Only)
Physical Actuation Software API call Direct 24VAC / DC Latch 24VAC C-Wire Relay / Valve None (Non-intrusive sensing)
Plumbing Work Required None None to Minimal (Manifold) Inline pipe cutting (C2 only) None (External clamp-on)
Electrical Interface Wi-Fi / Local Ethernet 24VAC transformer or Battery Spliced 24VAC Common line Self-contained battery
Cryptographic Root Vendor Cloud / Local MCU Hardware Secure Element (EAL6+) Onboard Secure MCU / ATECC608 Onboard Secure MCU / ATECC608
Offline Autonomy Poor (Requires cloud/LAN) High (Battery-backed RTC) High (Battery-backed RTC) High (Local non-volatile buffer)
Capital Unit Cost (AUD) $0 (Customer hardware) $180 – $320 $120 – $220 $90 – $160
Default Safe Mode Local controller schedule Capacitor return to NO Normally-Closed relay return Safe by design (Zero valves)
Evidentiary Integrity Medium (Third-party logs) High (Hardware-signed ACK) High (Hardware-signed ACK) Very High (Signed flow logs)

3. Multi-Physical Layer Transport Analysis & Protocol Mapping

The RESILIENCE-MESH logical payload operates across five distinct communications stacks:

┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                APPLICATION LAYER: RESILIENCE-MESH                                │
│       Profile J: Canonical JSON (RFC 8785) / JWS    │    Profile C: Compact CBOR (RFC 8949) / COSE│
├─────────────────────────────────────────────────────┼────────────────────────────────────────────┤
│   Transport Framing: HTTPS / REST / WebSockets / TLS│  Transport Framing: CoAP / DTLS / Raw PDU  │
├─────────────────────────┬───────────────────────────┼──────────────────────┬─────────────────────┤
│ Wi-Fi 802.11 b/g/n / ac │ 802.11ah (Wi-Fi HaLow)    │ Cellular NB-IoT / M1 │ LoRaWAN (AU915/AS923│ BLE 5.x Coded / RS485
└─────────────────────────┴───────────────────────────┴──────────────────────┴─────────────────────┴───────────────────────┘

3.1 Cellular NB-IoT (3GPP Cat-NB1 / Cat-NB2) & LTE-M (Cat-M1)

3.2 LoRaWAN (AS923, AU915, US915, EU868)

3.3 Bluetooth Low Energy (BLE 5.x)

3.4 Wi-Fi (IEEE 802.11 b/g/n and 802.11ah Wi-Fi HaLow)

3.5 Wired Industrial Interfaces (RS-485 / Modbus RTU / BACnet)


4. Dual-Payload Architecture

To bridge high-bandwidth enterprise cloud networks and resource-constrained LPWAN radios, RESILIENCE-MESH establishes a deterministic dual-payload architecture:

  1. Profile J (Canonical JSON): Uses RFC 8785 (JSON Canonicalization Scheme - JCS) for deterministic serialization and RFC 7515 (JSON Web Signature - JWS). Target transports: Cloud APIs, REST, WebSockets, Wi-Fi, LTE-M.
  2. Profile C (Compact CBOR): Uses RFC 8949 (Concise Binary Object Representation) and RFC 9052 / RFC 9053 (COSE_Sign1), mapping all keys to single-byte integers. Fits within 48 bytes for LoRaWAN AU915 DR0.
┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                   LOGICAL DATA MODEL ABSTRACTION                                 │
├──────────────────────────────────────────────────────────────────────────────────────────────────┤
│ - Protocol Version (uint8)               - Command UUID / Identifier                             │
│ - Monotonic Sequence Counter (uint64)    - 128-bit Cryptographic Nonce                           │
│ - Authority Identifier (String/uint)     - Target Device / Zone Mask                             │
│ - Command Type (Enum)                    - Validity Interval (Start Epoch / Expiry Epoch)        │
│ - Command Parameters (Duration, Rate Cap, Day-of-Week Mask, Start/End Seconds, Emergency Code)   │
│ - Cryptographic Signature (Ed25519 or ECDSA P-256)                                               │
└─────────────────────────────────┬────────────────────────────────┬───────────────────────────────┘
                                  │                                │
                                  ▼                                ▼
                    ┌───────────────────────────┐    ┌───────────────────────────┐
                    │ Profile J: Canonical JSON │    │ Profile C: Compact CBOR   │
                    │ RFC 8785 / RFC 7515 JWS   │    │ RFC 8949 / RFC 9052 COSE  │
                    │ Size: ~450 – 650 bytes    │    │ Size: ~38 – 85 bytes      │
                    │ Transports: Wi-Fi, Cloud  │    │ Transports: LoRaWAN, BLE  │
                    └───────────────────────────┘    └───────────────────────────┘

4.1 Profile J: Canonical JSON Specification (RFC 8785 & RFC 7515)

All Profile J payloads MUST be canonicalized strictly in accordance with RFC 8785 (JCS) prior to cryptographic signature generation and verification. Keys are lexicographically sorted by UTF-16 code units, redundant whitespace is stripped, and floating-point representations follow IEEE 754 standard formatting.

4.1.1 JSON Schema Definition (Draft 2020-12)

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://resilience-mesh.org/schema/v1/command.json",
  "title": "ResilienceMeshCommandPayload",
  "description": "Authoritative Profile J schema for signed water management directives under RESILIENCE-MESH RM-TIP-v1.0.0",
  "type": "object",
  "required": [
    "ver",
    "cmd_id",
    "seq_no",
    "auth_id",
    "dev_id",
    "zone_mask",
    "cmd_type",
    "valid_from",
    "valid_until",
    "params",
    "nonce",
    "sig"
  ],
  "properties": {
    "ver": {
      "type": "integer",
      "const": 1,
      "description": "Profile specification version. Must be 1."
    },
    "cmd_id": {
      "type": "string",
      "format": "uuid",
      "description": "Universally Unique Identifier for command traceability."
    },
    "seq_no": {
      "type": "integer",
      "minimum": 1,
      "maximum": 18446744073709551615,
      "description": "64-bit strictly monotonic sequence counter."
    },
    "auth_id": {
      "type": "string",
      "maxLength": 64,
      "pattern": "^[A-Z0-9_-]+$",
      "description": "Identifier of issuing water utility or municipal authority."
    },
    "dev_id": {
      "type": "string",
      "maxLength": 64,
      "pattern": "^[A-Z0-9_-]+$",
      "description": "Target edge gateway DevID or universal broadcast token."
    },
    "zone_mask": {
      "type": "integer",
      "minimum": 0,
      "maximum": 65535,
      "description": "16-bit bitmask indicating target zones (Bit 0 = Zone 1, 0xFFFF = All)."
    },
    "cmd_type": {
      "type": "string",
      "enum": [
        "PAUSE_SCHEDULE",
        "CAP_FLOW_RATE",
        "ENFORCE_WINDOW",
        "RESUME_SCHEDULE",
        "EMERGENCY_RELEASE"
      ],
      "description": "Standardized command taxonomy token."
    },
    "valid_from": {
      "type": "integer",
      "minimum": 1700000000,
      "description": "UTC Unix epoch seconds when directive becomes active."
    },
    "valid_until": {
      "type": "integer",
      "minimum": 1700000000,
      "description": "UTC Unix epoch seconds when directive expires (max valid_from + 259200)."
    },
    "params": {
      "type": "object",
      "properties": {
        "duration_sec": {
          "type": "integer",
          "minimum": 1,
          "maximum": 259200,
          "description": "Duration in seconds (clamped to max 72 hours)."
        },
        "cap_flow_lpm": {
          "type": "number",
          "minimum": 0.0,
          "maximum": 500.0,
          "description": "Instantaneous flow ceiling in Litres per Minute."
        },
        "daily_cap_litres": {
          "type": "integer",
          "minimum": 0,
          "maximum": 100000,
          "description": "Total volumetric allocation per 24-hour UTC cycle."
        },
        "enforcement_action": {
          "type": "string",
          "enum": ["THROTTLE", "CYCLE_SOAK_PULSE", "ISOLATE_UPON_EXCEED"],
          "description": "Edge action upon flow breach."
        },
        "window_dow_mask": {
          "type": "integer",
          "minimum": 0,
          "maximum": 127,
          "description": "7-bit day mask: Bit 0=Mon, Bit 1=Tue, Bit 2=Wed, Bit 3=Thu, Bit 4=Fri, Bit 5=Sat, Bit 6=Sun."
        },
        "window_start_sec": {
          "type": "integer",
          "minimum": 0,
          "maximum": 86400,
          "description": "Allowed watering start time in seconds past UTC midnight."
        },
        "window_end_sec": {
          "type": "integer",
          "minimum": 0,
          "maximum": 86400,
          "description": "Allowed watering end time in seconds past UTC midnight."
        },
        "target_cmd_id": {
          "type": "string",
          "format": "uuid",
          "description": "Target command ID to revoke for RESUME_SCHEDULE."
        },
        "reason_code": {
          "type": "string",
          "maxLength": 64,
          "description": "Standardized reason code for restriction or resumption."
        },
        "emergency_code": {
          "type": "string",
          "maxLength": 32,
          "description": "Emergency service incident authorization code."
        }
      },
      "additionalProperties": false
    },
    "nonce": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{32}$",
      "description": "128-bit hex-encoded cryptographic nonce."
    },
    "sig": {
      "type": "object",
      "required": ["alg", "kid", "val"],
      "properties": {
        "alg": {
          "type": "string",
          "enum": ["Ed25519", "ES256"],
          "description": "Cryptographic signature algorithm."
        },
        "kid": {
          "type": "string",
          "maxLength": 64,
          "description": "Key ID matching utility certificate in edge trust store."
        },
        "val": {
          "type": "string",
          "description": "Base64URL-encoded digital signature."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

4.1.2 Production Profile J Example: ENFORCE_WINDOW Command (RFC 8785 Canonical Form)

{"auth_id":"AU-WA-WATERCORP-01","cmd_id":"8a93ef01-2e6b-4e12-b911-37d45f3b7908","cmd_type":"ENFORCE_WINDOW","dev_id":"NODE-WA-PERTH-004812","nonce":"7f2b189c4d2e01a35b8e92f146a7c3d0","params":{"window_dow_mask":40,"window_end_sec":32400,"window_start_sec":64800},"seq_no":10982,"sig":{"alg":"Ed25519","kid":"KEY-WC-DISPATCH-2026B","val":"e5qWqA2X8_KjMvT9pL1rS3tU5vW7xY9z0123456789abcdefABCDEF0123456789abcdef0123456789abcdefABC=="},"valid_from":1791331200,"valid_until":1791417600,"ver":1,"zone_mask":65535}

4.2 Profile C: Compact CBOR Specification (RFC 8949 & RFC 8610)

For constrained radios (LoRaWAN AU915 DR0, BLE Coded beacons), Profile C maps string keys to compact integer tags, strips verbose UUIDs, and utilizes binary byte-strings.

4.2.1 Integer Key Mapping Dictionary

CBOR Tag Logical Identifier Data Type Description
1 ver uint Protocol Version (always 1)
2 seq uint Monotonic Sequence Number (64-bit uint)
3 cmd uint Command Code: 1=PAUSE, 2=CAP, 3=WINDOW, 4=RESUME, 5=EMERGENCY
4 zn uint Zone Bitmask (16-bit uint, 0xFFFF for all)
5 exp uint Expiration Epoch (32-bit uint seconds)
6 par map Command Parameters Map
6.1 dur uint Duration in seconds
6.2 cap uint Flow Cap in deci-litres/min (0.1 L/min)
6.3 dow uint Day-of-week bitmask (7-bit)
6.4 w_s uint Window Start (minute of day: 0..1439)
6.5 w_e uint Window End (minute of day: 0..1439)
7 nnc bstr Truncated Nonce (8 bytes)
8 kid uint Dispatcher Key Index in edge trust store (1 byte)
9 sig bstr Compact Signature (64 bytes raw Ed25519 or raw $R \parallel S$ ECDSA)

4.2.2 CDDL Specification (RFC 8610)

resilience_mesh_compact_cmd = {
  1 => uint,                          ; ver: protocol version
  2 => uint,                          ; seq: monotonic sequence counter
  3 => 1..5,                          ; cmd: 1=PAUSE, 2=CAP, 3=WINDOW, 4=RESUME, 5=EMERGENCY
  4 => uint .size 2,                  ; zn: 16-bit zone bitmask
  5 => uint .size 4,                  ; exp: expiration UTC epoch seconds
  6 => param_map,                     ; par: parameter map
  ? 7 => bstr .size 8,                ; nnc: 8-byte cryptographic nonce
  8 => uint .size 1,                  ; kid: 1-byte trusted key index
  9 => bstr .size 64                  ; sig: raw 64-byte Ed25519 or P-256 signature
}

param_map = {
  ? 1 => uint,                        ; dur: duration in seconds (1..259200)
  ? 2 => uint,                        ; cap: flow cap in deci-litres/min
  ? 3 => uint .size 1,                ; dow: 7-bit day of week mask
  ? 4 => 0..1439,                     ; w_s: window start minute of day
  ? 5 => 0..1439                      ; w_e: window end minute of day
}

4.2.3 Profile C Diagnostic & Hex Dump (PAUSE_SCHEDULE for 24 Hours)

CBOR Diagnostic Notation:

{
  1: 1,
  2: 1043,
  3: 1,
  4: 65535,
  5: 1791417600,
  6: {
    1: 86400
  },
  7: h'7f2b189c4d2e01a3',
  8: 2,
  9: h'83a91bf2e4d06a12bc9034f1e5a87b1c3d9021e84a5b6c7d8e9f0123456789ab9876543210fedcba0987654321fedcba0987654321fedcba0987654321fedcba'
}

Byte Count Analysis for LoRaWAN AU915 DR0: * Header and Parameter Map: 26 bytes * Truncated Nonce (8 bytes): 10 bytes * Key Index (1 byte): 2 bytes * Subtotal (Data payload): 38 bytes * Raw Ed25519 Signature: 64 bytes * Total Combined Size: 102 bytes. * LoRaWAN Transmission Strategy: When operating at AU915 DR0 (51-byte maximum MAC payload), edge nodes and dispatchers utilize COSE Detached Signatures across two sequential fragmented packets or step up to DR2 (125 bytes) where the entire 102-byte frame transmits in a single burst.


5. Cryptographic Suite & 3-Tier PKI Hierarchy

5.1 Asymmetric Primitive Selection

RESILIENCE-MESH explicitly forbids shared symmetric keys across the edge fleet. All commands require asymmetric signature verification.

┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
│                               CRYPTOGRAPHIC PRIMITIVE COMPARISON                                 │
├──────────────────────────────────┬───────────────────────────────┬───────────────────────────────┤
│ Evaluation Metric                │ Ed25519 (RFC 8032)            │ ECDSA P-256 (FIPS 186-4)      │
├──────────────────────────────────┼───────────────────────────────┼───────────────────────────────┤
│ Security Equivalent              │ ~128 bits                     │ 128 bits                      │
│ Public Key Wire Size             │ 32 bytes                      │ 33 bytes (compressed)         │
│ Signature Wire Size              │ 64 bytes                      │ 64 bytes (raw R || S)         │
│ Verification Latency (Cortex-M4) │ 18.2 milliseconds             │ 33.7 milliseconds             │
│ Implementation Hardening         │ Immune to timing side-channels│ Requires explicit SCA defense │
│ Standards Compliance             │ IETF / Modern Zero-Trust      │ Australian ISM / NIST / FIPS  │
└──────────────────────────────────┴───────────────────────────────┴───────────────────────────────┘

Firmware Mandate: All compliant edge gateways MUST implement dual verification support for both Ed25519 and ECDSA P-256. State utility deployments complying with Australian Cyber Security Centre (ACSC) Information Security Manual (ISM) guidelines deploy ECDSA P-256; municipal council and battery-constrained LPWAN deployments deploy Ed25519 for optimized computational battery conservation.


5.2 3-Tier Public Key Infrastructure (PKI) Architecture

To prevent a single server compromise from exposing the entire state water fleet, key issuance is partitioned into three hierarchical tiers:

┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
│                         TIER 0: STATE CRITICAL WATER INFRASTRUCTURE ROOT CA                      │
│ - Air-gapped, offline root certificate (Ed25519 / P-256)                                         │
│ - 25-Year Validity | Held under multi-person m-of-n physical key ceremony quorum                 │
└────────────────────────────────────────────────┬─────────────────────────────────────────────────┘
                                                 │ Issues Tier 1 Certificates
                                                 ▼
┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
│                         TIER 1: JURISDICTIONAL UTILITY / COUNCIL ISSUING CA                      │
│ - e.g., WA Water Corporation Issuing CA / City of Wanneroo Issuing CA                            │
│ - FIPS 140-3 Level 3 Hardware Security Module (HSM) | 5-to-10 Year Validity                      │
└────────────────────────────────────────────────┬─────────────────────────────────────────────────┘
                                                 │ Issues Short-Lived Operational Keys & SKRB
                                                 ▼
┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
│                         TIER 2: OPERATIONAL DISPATCHER EPHEMERAL KEYS                            │
│ - Automated demand-management dispatch engines & SCADA bridge servers                            │
│ - Online Cloud HSM / KMS | Bounded 30-to-90 Day Validity                                         │
└────────────────────────────────────────────────┬─────────────────────────────────────────────────┘
                                                 │ Signs Outbound Commands to Edge Nodes
                                                 ▼
┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
│                         TIER 3: EDGE DEVICE SECURE ELEMENT TRUST STORE                           │
│ - Factory-provisioned IEEE 802.1AR Secure Device Identity (DevID)                                │
│ - Pinned Tier 0 Root & Tier 1 Issuing Public Keys in protected NVRAM                             │
│ - Verifies Tier 2 Dispatcher Signatures locally without cloud round-trip                         │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘

5.3 Constrained Key Revocation: Signed Key Revocation Broadcasts (SKRB)

Constrained LPWAN edge devices cannot query Online Certificate Status Protocol (OCSP) endpoints or download multi-megabyte Certificate Revocation Lists (CRLs). RESILIENCE-MESH resolves key revocation via two combined mechanisms: 1. Short Ephemeral Lifespans: Tier 2 dispatch keys expire automatically within 30 to 90 days. An unrenewed key becomes invalid upon timestamp expiration. 2. Signed Key Revocation Broadcast (SKRB): If a Tier 2 dispatcher key is compromised, the Tier 1 Issuing CA signs a high-priority 32-byte revocation frame containing the compromised Key ID (kid) and revocation timestamp. Broadcast over LoRaWAN and cellular paging channels, edge devices immediately flag the target kid as permanently blacklisted in non-volatile flash.


6. 3-Point Anti-Replay Architecture & Liveness Guarantees

Because replaying a previously valid PAUSE_SCHEDULE command could maliciously shut off irrigation indefinitely, edge devices enforce a mandatory Three-Point Anti-Replay Engine:

                       INCOMING SIGNED COMMAND
                                  │
                                  ▼
             ┌──────────────────────────────────────────┐
             │ Point 1: Monotonic Sequence Counter      │
             │ seq_no > NVRAM last_seen_seq?            │
             └────────────────────┬─────────────────────┘
                                  │ YES
                                  ▼
             ┌──────────────────────────────────────────┐
             │ Point 2: UTC Validity Window             │
             │ valid_from - 120s <= RTC_UTC             │
             │                   <= valid_until + 120s? │
             └────────────────────┬─────────────────────┘
                                  │ YES
                                  ▼
             ┌──────────────────────────────────────────┐
             │ Point 3: Cryptographic Nonce & Signature │
             │ Nonce unseen in cache & Sig Valid?       │
             └────────────────────┬─────────────────────┘
                                  │ YES
                                  ▼
                      EXECUTE COMMAND ACTUATION
                      last_seen_seq = seq_no
                      Store Nonce in 30-day ring buffer

6.1 Point 1: 64-Bit Monotonic Sequence Counter (seq_no)

6.2 Point 2: Bounded UTC Expiration Window (valid_from & valid_until)

6.3 Point 3: 128-Bit Cryptographic Nonce (nonce)

6.4 Clock Drift and Desynchronized RTC Fallback


7. Command Taxonomy & Priority Preemption Hierarchy

7.1 Priority Preemption Rules

When multiple commands or physical conditions coincide, edge firmware resolves conflicts strictly according to this priority hierarchy:

┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                   COMMAND ARBITRATION HIERARCHY                                  │
├─────────────────────────┬────────────────────────────────────────────────────────────────────────┤
│ Priority Level          │ Command / Condition                                                    │
├─────────────────────────┼────────────────────────────────────────────────────────────────────────┤
│ Priority 1 (HIGHEST)    │ EMERGENCY_RELEASE (Unconditional fail-open for life-safety / fire)   │
├─────────────────────────┼────────────────────────────────────────────────────────────────────────┤
│ Priority 2              │ LOCAL_SAFETY_INTERLOCK (Burst pipe detection, backflow fail, leak cut) │
├─────────────────────────┼────────────────────────────────────────────────────────────────────────┤
│ Priority 3              │ RESUME_SCHEDULE (Administrative restriction lift or exemption grant)   │
├─────────────────────────┼────────────────────────────────────────────────────────────────────────┤
│ Priority 4              │ PAUSE_SCHEDULE (Temporary complete circuit suspension)                 │
├─────────────────────────┼────────────────────────────────────────────────────────────────────────┤
│ Priority 5              │ ENFORCE_WINDOW (Statutory curfew / roster window gating)               │
├─────────────────────────┼────────────────────────────────────────────────────────────────────────┤
│ Priority 6 (LOWEST)     │ CAP_FLOW_RATE (Volumetric throttling or instantaneous rate ceiling)    │
└─────────────────────────┴────────────────────────────────────────────────────────────────────────┘

7.2 Detailed Command Specifications

1. PAUSE_SCHEDULE

2. CAP_FLOW_RATE

3. ENFORCE_WINDOW

4. RESUME_SCHEDULE

5. EMERGENCY_RELEASE


8. Bidirectional Signed Receipts & Tamper Bitmasks

Every physical command execution requires cryptographic closure: the edge device signs an execution receipt confirming physical compliance.

       UTILITY DISPATCH ENGINE                            EDGE GATEWAY
                 │                                              │
                 │ ─── 1. Signed Dispatch Command ────────────► │
                 │                                              │ [Verify Signature, Counter & TTL]
                 │                                              │ [Actuate Physical Solenoid/Relay]
                 │                                              │ [Measure Flow & Pressure Sensors]
                 │                                              │ [Sign Execution Receipt via DevID]
                 │ ◄── 2. Signed Execution Receipt (ACK/NACK) ──│
                 │                                              │

8.1 Signed Execution Receipt Schema (Profile J)

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://resilience-mesh.org/schema/v1/receipt.json",
  "title": "ResilienceMeshExecutionReceipt",
  "type": "object",
  "required": [
    "ver",
    "receipt_id",
    "req_cmd_id",
    "dev_id",
    "exec_status",
    "status_code",
    "exec_epoch",
    "state_before",
    "state_after",
    "telemetry",
    "tamper_flags",
    "sig"
  ],
  "properties": {
    "ver": { "type": "integer", "const": 1 },
    "receipt_id": { "type": "string", "format": "uuid" },
    "req_cmd_id": { "type": "string", "format": "uuid" },
    "dev_id": { "type": "string", "maxLength": 64 },
    "exec_status": { "type": "string", "enum": ["SUCCESS", "FAILED", "REJECTED"] },
    "status_code": {
      "type": "integer",
      "enum": [200, 400, 401, 403, 408, 500, 503]
    },
    "exec_epoch": { "type": "integer", "description": "UTC Unix epoch seconds of execution" },
    "state_before": { "type": "string", "enum": ["VALVE_OPEN", "VALVE_CLOSED", "UNKNOWN"] },
    "state_after": { "type": "string", "enum": ["VALVE_OPEN", "VALVE_CLOSED", "THROTTLED"] },
    "telemetry": {
      "type": "object",
      "required": ["flow_lpm", "pressure_kpa", "battery_mv"],
      "properties": {
        "flow_lpm": { "type": "number", "minimum": 0.0 },
        "pressure_kpa": { "type": "number", "minimum": 0.0 },
        "battery_mv": { "type": "integer", "minimum": 0 }
      },
      "additionalProperties": false
    },
    "tamper_flags": {
      "type": "integer",
      "minimum": 0,
      "maximum": 65535,
      "description": "16-bit diagnostic and tamper bitmask"
    },
    "sig": {
      "type": "object",
      "required": ["alg", "kid", "val"],
      "properties": {
        "alg": { "type": "string", "enum": ["Ed25519", "ES256"] },
        "kid": { "type": "string", "description": "Device DevID public key identifier" },
        "val": { "type": "string", "description": "Base64URL encoded signature over canonical receipt" }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

Status Codes:


8.2 16-Bit Tamper & Diagnostic Bitmask Definitions

The tamper_flags field is a 16-bit integer communicating real-time edge health and physical tampering conditions:

Bit  15  14  13  12  11  10   9   8   7   6   5   4   3   2   1   0
    ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
    │RES│RES│RES│RES│RES│MIS│DET│BUR│LOW│DES│MAG│ENC│STC│STO│SHT│OPN│
    └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘
Bit Position Hex Mask Flag Identifier Condition Description
Bit 0 0x0001 FAULT_SOLENOID_OPEN Solenoid sense circuit detects broken coil or disconnected wiring harness.
Bit 1 0x0002 FAULT_SOLENOID_SHORT Solenoid coil resistance < 5.0 Ohms (overcurrent protection tripped).
Bit 2 0x0004 FAULT_VALVE_STUCK_OPEN Flow detected (>1.0 L/min) 15 seconds after valve commanded CLOSED.
Bit 3 0x0008 FAULT_VALVE_STUCK_CLOSED Zero flow detected during active schedule with mainline pressure confirmed.
Bit 4 0x0010 TAMPER_ENCLOSURE_OPEN Enclosure chassis microswitch or optical sensor detects lid removal.
Bit 5 0x0020 TAMPER_MAGNETIC_DETECT Internal 3-axis magnetometer detects external flux > 50 Gauss (meter sabotage).
Bit 6 0x0040 FAULT_RTC_DESYNC Backup coin cell dead; real-time clock running uncalibrated timer ticks.
Bit 7 0x0080 FAULT_BATTERY_LOW LiSOCl2 cell terminal voltage < 3.1V; cannot guarantee reliable pulse torque.
Bit 8 0x0100 FAULT_BURST_DETECTED Catastrophic continuous flow exceeding 40 L/min for > 60 minutes.
Bit 9 0x0200 TAMPER_TRANSDUCER_DETACH Type D clamp-on ultrasonic transducer acoustic impedance loss (detached).
Bit 10 0x0400 FAULT_ELECTRICAL_MISWIRE Type C interrupter senses reverse AC phantom voltage on common wire.
Bits 11–15 0xF800 RESERVED Reserved for future standardization.

9. Zero Inbound Listening Port & Security Hardening Architecture

To completely eliminate network-based penetration, remote code execution, and botnet propagation across the edge fleet, RESILIENCE-MESH enforces a strict Zero Inbound Open Listening Port policy:

  1. No Inbound Socket Bindings: Edge gateways running on IP transports (Wi-Fi, Cellular NB-IoT/LTE-M, Ethernet) DO NOT bind or expose open TCP or UDP listening ports on any public or local interface. Standard attack vectors (port scanning, SSH brute-forcing, Web UI exploits, CoAP reflection) are mechanically rendered inoperable.
  2. Outbound-Initiated Ephemeral Sockets: All IP network interactions are initiated outbound by the edge gateway to the authenticated utility message broker using TLS 1.3 or DTLS 1.2 with mutual certificate authentication (mTLS). Commands are delivered down established keepalive tunnels (MQTT subscriptions, HTTP/2 push streams) or passive LPWAN downlink slots.
  3. Firmware Integrity & Secure Boot: Microcontrollers enforce Hardware Root of Trust secure boot. Bootloaders verify digital signatures on firmware binary images prior to execution. Downgrade prevention eFuses prevent rollback to vulnerable older firmware builds.

10. Conformance, Testability & Verification

To achieve certification under RM-TIP-v1.0.0, edge hardware and software platforms must satisfy the following test suite:

  1. RFC 8785 Canonical Serialization Test: Verifier passes 1,000 randomized JSON command objects containing varying key orders, float formats, and whitespace. Device output must match the cryptographic hash of the canonical representation with 100.0% bitwise parity.
  2. Anti-Replay Rejection Suite: Device is fed: (a) identical sequence numbers, (b) decremented sequence numbers, (c) expired timestamp windows ($>120\text{s}$ drift), and (d) previously seen nonces. Device must reject 100% of invalid payloads with corresponding status codes (403 or 408).
  3. LoRaWAN DR0 Payload Verification: Profile C commands must be validated using a CDDL test parser. Total payload must not exceed 48 bytes without signature or 102 bytes with raw signature.
  4. Hardware Fail-Safe Validation: Power is cut to the gateway during an active restriction lease. Type C interrupter relays must drop to closed (continuity restored) within $<50\text{ milliseconds}$. Motorized Type B valves must either remain in place or execute a capacitive return to open within $<15\text{ seconds}$.
  5. Watchdog Expiration Test: Device receives a valid 1-hour PAUSE_SCHEDULE lease. Communication is severed. Device must autonomously restore unrestricted operation within $3600 \pm 5 \text{ seconds}$ without external intervention.