Drift-Tracked Freshness Windows for Low-Power Edge Devices

Many edge and Internet-of-Things protocols stop replay attacks with timestamps. The sender stamps each message with its local time, and the receiver accepts it only if the stamp falls within a tolerance window $\Delta$ of the receiver's own clock. Inside that window the receiver keeps a small cache of recently seen messages so it can catch duplicates. This avoids the server state that nonce schemes need. It also makes the window a promise about timeliness: an accepted message is at most about $\Delta$ old. The weak point is clock synchronization. Cheap device oscillators drift. Network delay looks the same as drift to the receiver. When a valid message is rejected, the device usually falls back to a full authentication handshake, and that handshake can account for nearly all the energy of a small transaction.

We propose to stop treating $\Delta$ as a fixed constant and to stop treating synchronization as something that must happen before freshness checks work. The verifier would track each client's clock offset and drift from the authenticated messages it already receives, and accept messages against a narrow window centered on that prediction. The client would then spend its energy only where the remaining error budget requires it: resynchronizing when its predicted offset uncertainty grows, and setting its processor frequency and transmit timing so that latency stays under the deadline. In short, the receiver learns each sender's clock so the sender does not have to keep fixing it, and the sender's energy settings are chosen against an explicit limit on how often its messages may be rejected.

Core Claim

For applications where the freshness window is a real deadline, such as actuation commands or sensor readings feeding a control loop, the end-to-end error at the verifier has two parts. The first is clock-offset error, which grows with time since the last synchronization. The second is delivery latency, which grows when the device lowers its CPU frequency or waits through a poor channel. Both parts can be priced in energy. Let $o_i$ be client $i$'s clock offset, $\hat o_i$ the verifier's tracked estimate with predictive standard deviation $\sigma_i$, $T$ the client's timestamp, $T_s$ the verifier's arrival time, $D$ the application's latency deadline, and $k$ a confidence multiplier. The verifier accepts if

$$-k\sigma_i \;\le\; T_s - (T - \hat o_i) \;\le\; D + k\sigma_i ,$$

and keeps duplicates in a cache covering only this window. With high probability, an accepted message is then at most $D + 2k\sigma_i$ old. A false rejection happens for one of two reasons. Either the latency exceeded $D$, which the client controls through processor frequency and transmit timing, or the true offset error exceeded $k\sigma_i$, which the client controls through resynchronization. The client minimizes average energy subject to a long-run rejection rate of at most $\varepsilon$. It enforces that limit with a virtual queue $Q(t+1)=\max(Q(t)+r(t)-\varepsilon,0)$, where $r(t)$ indicates a rejection in slot $t$. This follows the drift-plus-penalty control used in Wireless Edge Machine Learning.

Two things would be new. The first is a freshness check that tracks each client's drift at the verifier, together with a proof that an adversary who can only delay authenticated messages can shift the window by a bounded amount. The second is a client controller that couples processor frequency and radio decisions to replay-window acceptance, instead of treating security as a zero-cost condition.

Where This Sits

The timestamp authentication literature motivates the problem but treats the window as static and assumes synchronized clocks. A smart-card password scheme (An Improved Timestamp-Based Password Authentication Scheme Using Smart Cards) and a multi-server biometric scheme (Robust Biometrics Based Authentication...) both use a fixed $\Delta$. Both note that drift and propagation lag cause legitimate users to be rejected. Identity Based Message Authentication for Dynamic Networks shows the opposite failure, where wide windows allow replay. Edge protocols name synchronization as an unsolved limitation without addressing it:

None of these measures energy or adapts the window. We keep their cryptography unchanged and replace only the freshness check and the policy around it.

Two papers supply the cost structure that makes rejections expensive. Hanssens et al. replace per-request TLS with HMAC-signed, timestamped requests after an initial TLS login, and fall back to that login when tokens fail. Potlapally et al. measured on real hardware that the handshake is about 99% of client energy for 1 KB transactions. Together these explain why a false rejection is the dominant cost: it converts a cheap request into a handshake.

Synchronization work supplies part of the method but stays at the timing layer. DASA learns a small neural synchronization rule that copes with drift up to 100 ppm, and leaves its energy cost on low-power nodes open. D-KPW combines Kalman filtering with stability-weighted ensembles for satellite timekeeping. We borrow the Kalman-style offset and drift tracking idea. We apply it at the verifier, using only timing information already carried by authenticated traffic, so it costs no extra radio messages.

The latency-energy literature supplies the control method but ignores security:

  • Merluzzi et al. control transmission rate, quantization and CPU frequency with Lyapunov optimization.
  • Mo et al. jointly map tasks and set processor frequency (DVFS, dynamic voltage and frequency scaling) under deadlines and a 0.998 reliability target.
  • E4 scales DVFS just in time for early-exit inference.

All three assume perfectly coordinated time slots and verification that costs nothing. We add the rejection constraint as one more virtual queue.

Research Program

Measurement. The first part measures the loop end to end, because the cost model must come from data rather than assumption. On Raspberry Pi 3 B+ nodes and Jetson Nano and AGX Orin boards, we will log system-clock and real-time-clock offset against an external reference pulse. We will do this across DVFS governors, fixed frequencies, and board temperatures. This directly tests the coupling hypothesized in Gap 3 of the file: that aggressive frequency scaling changes thermal conditions and accelerates timer drift. It is quite possible that the crystal driving the timekeeping clock is insensitive to CPU frequency and responds only to ambient temperature. If so, we will report that the coupling is absent and remove it from the model.

On the same boards we will measure the energy and latency of three operations at each frequency step, using onboard power monitors on the Jetsons and an external sense resistor on the Pis in the style of Potlapally et al.:

  • a Hanssens-style HMAC-plus-timestamp request;
  • a SUSIC-style ECC exchange using the MIRACL library;
  • the fallback full TLS handshake.

Verifier. The second part builds the verifier. For each client it runs a two-state filter over offset and drift rate. The filter is fed by a lower-envelope estimate of $T_s - T$, because added delay can only push observed values upward. The filter's slew rate is capped at the physically plausible maximum drift change for the oscillator class. Within this design we will prove a bound. An adversary who can only delay or drop authenticated messages can shift the acceptance window by at most the capped slew multiplied by elapsed time. It accepts no replay, because every accepted message still passes the in-window duplicate cache.

The tracker's state is soft. If it is lost, the verifier falls back safely to a conservative static window rather than to insecurity. This is the property that distinguishes the design from counter-based schemes.

Client controller. The third part builds the client controller. In each slot it chooses among three actions: send now at a chosen frequency, delay for a better channel, or first issue a cheap time request that piggybacks on the next exchange. It decides using the $\sigma_i$ the verifier returns in each acceptance and the virtual rejection queue.

Baselines

The naive reference is the deployed practice in the cited protocols: a fixed window with an in-window duplicate cache, and no synchronization beyond what the operating system does. We run it at two settings. The tight setting equals the application deadline $D$, which preserves timeliness. The loose setting is sized so false rejections never occur, which preserves availability. Both use the identical HMAC-timestamp protocol of Hanssens et al., the same devices, and the same traces.

The strongest existing practice is periodic NTP-style synchronization with a static window. We sweep the synchronization period and window size over a grid, so the baseline gets a tuning budget at least as large as our controller's hyperparameter search. We then compare at matched false-rejection rate and matched worst-case accepted age.

The strongest non-timestamp competitor is a per-client monotonic counter with a reordering bitmap, in the style of IPsec anti-replay windows (no paper in the file covers it). We run it with counters persisted to flash on the client, so its reboot cost is counted.

For the protocol's own cost, the only reported figures are these:

  • 264 ms processing and 1,869 bytes per request, against 370 ms and 2,937 bytes for full TLS (Hanssens et al.).
  • Handshake energy of about 99% of a 1 KB transaction (Potlapally et al.).

No reported result was found on Lacuna for false-rejection rate or client energy per accepted message under clock drift, for any of these schemes. Our measurements therefore establish the baseline numbers, not just ours.

Two ablations isolate the ingredients. One uses verifier-side drift tracking with a fixed client policy. The other uses the client controller with a static window. Beating the baselines means lower client energy per accepted message than tuned NTP, at equal or lower rejection rate and an equal timeliness bound. It also means doing this without the persistent state the counter scheme needs.

Why not just…?

Why not just use nonces or per-client counters instead of timestamps? A pure nonce cache grows without bound. Two-way challenges add a round trip, which Hanssens et al. and Potlapally et al. show is costly in latency and energy. Counters, however, are a real threat. They need only one integer per client and no clocks. Their weaknesses are specific. They give no bound on how late a message arrives, so a captured actuation command can be held and released later. They also need durable state on both ends to survive reboots. The counter baseline will settle this. If the target applications turn out to have no real deadline and the devices can afford flash writes, counters win, and we will say so.

Why not just run NTP periodically and pick a conservative window? For duty-cycled devices, each synchronization wakes the radio. Drift during long sleeps forces either frequent wakes or a window wider than the deadline. DASA's results (Abakasanga et al.) also show that analytic synchronization leaves large residual offsets under propagation delay and drift. The tuned NTP grid in our experiments is the direct test. If its energy-versus-rejection curve matches ours at the same timeliness bound, verifier-side tracking adds nothing.

Why not just widen the window, since the in-window cache already blocks replays? This is correct for replay itself. With a duplicate cache, a wide window does not admit replays, and at low message rates the cache memory is trivial. What a wide window gives up is timeliness: the receiver can no longer promise the message is recent. So this alternative wins wherever freshness is not a deadline. We therefore restrict the claim to deadline-bearing traffic, and we report cache memory and worst-case accepted age for both the wide-window baseline and ours.

Proposed Experiments

Traces and workloads. Trace-driven simulation combines the measured drift and latency-energy profiles with recorded channel delay traces. We use two workloads. The first is a duty-cycled sensor upload stream shaped after the Gas Sensor Array and Hydraulic System Monitoring streams used by Merluzzi et al.. The second is a periodic command stream with deadlines of 50 to 500 ms. A twenty-node Pi testbed then reproduces the best and worst simulated regimes on real radios.

Metrics. We record client energy per accepted message, false-rejection rate, fallback handshakes per hour, verifier cache memory, and worst-case accepted age. Under an active attacker who replays and selectively delays messages, we also record replays accepted, which must be zero, and the achieved window shift.

Decisive checks. Four results decide the proposal.

  1. Drift tracking pays off. The tracker-only ablation must cut fallback handshakes relative to the tight static window, at no added radio cost. If it does not, verifier-side tracking is not worth its complexity.
  2. The full system beats tuned NTP. At matched rejection rate and age bound, the full system must use measurably less energy than tuned NTP on the duty-cycled workload.
  3. The security bound holds. The measured adversarial window shift must stay within the proven slew bound.
  4. DVFS-drift coupling is real or not. The measurement phase either shows that frequency scaling changes drift rate, or shows that it does not. If it does not, the client controller reduces to a latency-only controller, which is still useful but narrower.