Each device runs an independent handshake loop against the gateway. Whether a handshake succeeds depends on the method's key model and, after a simulated leak, on whether the fleet's key generation has rotated past the stolen one:
PSK shared secret K, same on device + gateway
X.509 Cert device holds private key d in flash/software
TPM / SE device holds private key d sealed inside secure
hardware — d can be *used* but never *read out*
Attacker success (post-leak) =
1 if method != TPM AND genNow == genLeaked
0 otherwise (TPM: d never left the chip to be leaked;
any method: rotation advanced genNow)
The whole fleet rotates its keys together on a fixed clock: t_rotate = n · rotationInterval. A rotation bumps the global key generation counter and immediately invalidates any previously-leaked secret for PSK and software-stored certificates — this is exactly why short rotation windows limit the blast radius of a stolen key. A TPM/Secure-Element-backed key never appears in the leak at all, because authentication uses the chip to sign a challenge without ever exporting the private key, so an attacker with a cloned certificate still cannot complete the handshake.
- PSK — fastest handshake (~15–40 ms, symmetric crypto) but the shared secret is a single flat file; if it leaks, an attacker authenticates indistinguishably from the real device until the next rotation.
- X.509 Cert — slower asymmetric handshake (~120–220 ms); stronger than PSK per-device, but if the private key sits in plain flash it is just as exposed to a leak.
- TPM / SE — slowest (~180–320 ms, hardware attestation overhead) but the private key is non-exportable, so a credential leak (e.g. firmware dump) never yields anything an attacker can replay.