The Anti-Replay Clause That Decides Whether Your Spacecraft Survives a Ground Failover
In the CCSDS Space Data Link Security protocol, the receiver must discard any authenticated frame whose sequence number falls outside its anti-replay window, and that rule is enforced silently. Read in isolation, it is a replay defence. Read against a ground-station failover or an onboard reset, it is the most likely way a fully authenticated telecommand link locks itself out. The compliance evidence a reviewer actually needs is not that the clause is implemented. It is proof that the system keeps accepting legitimate commands when the component holding the counter fails.
One family, three jobs
The relevant standards are easier to defend when grouped by what they protect rather than by issue number. The CCSDS security recommendations split into link-layer protection, which is SDLS and its extended procedures for frame authentication and encryption; key and security-association management, which covers how keys are loaded, rotated and made active onboard; and the cryptographic algorithm baseline, which fixes authenticated encryption modes so ground and space agree on the primitives. Keys delivered by a space-to-ground QKD link do not get a regime of their own. They land in the same onboard key store and inherit every state-management problem described below. The algorithm baseline rarely fails a review. Reviews fail on security-association state, which the management procedures define but leave to the implementer to keep alive.
What the clause forces onboard
The anti-replay sequence number belongs to the security association, so it is persistent state with the same criticality as the key itself, and an implementation that keeps it only in processor RAM is non-compliant the first time a single-event upset triggers a reboot. Restore a stale counter from non-volatile memory and the spacecraft will accept a recorded command that an adversary replays, which is a security failure. The direction you choose for the loss is therefore the design decision: the onboard counter must be committed to non-volatile memory before the command it authenticates is executed, using write-ahead ordering, so that a reset can only ever leave the stored value ahead of the true one. The cost is a write per accepted frame, or a reserved block of sequence numbers committed in advance and skipped after reset. That cost is small next to an execution path that accepts replays.
The failure mode lives on the ground
The scenario that actually locks spacecraft out is a mission control failover where the backup site starts transmitting with a replicated counter that lags the primary. Every frame then arrives below the window and gets discarded, the spacecraft does nothing, and operators see a link that looks healthy at the RF and framing layers. The Frame Security Report in the extended procedures, carried in the operational control field next to the CLCW, is what breaks the silence: its bad-sequence flag and last-used SPI tell the ground exactly why frames are dying, so the evidence package should show that the backup site decodes and alarms on it rather than only parsing the CLCW. The decision rule follows directly. When a counter source is lost, the takeover site must jump its sequence number forward by more than the primary could have emitted without acknowledgement, and a jump that is too large costs nothing while one that is too small costs the pass. As an estimate, a few minutes of unacknowledged uplink before failover detection puts that margin in the hundreds of frames, which is why the jump should be a configured policy and not an operator's judgement.
Containment when everything else is wrong
The last layer is a narrow recovery security association, authenticated with its own key, processed by the hardware command decoder below the flight software, and allowed only to reset security-association state rather than execute arbitrary commands, with the spacecraft entering it autonomously when a command-loss timer of 72 hours expires without a valid authenticated frame; that keeps zero-trust scoping intact because the recovery channel can repair the link without ever becoming a privileged back door into the payload or bus.
Technical FAQ: Should the recovery security association share the anti-replay rules of the operational ones?
Yes, but its counter must sit in a separate non-volatile region with its own write-ahead commit, because a fault that corrupts the operational association state must not be able to take the recovery path down with it. The trade-off that remains is the timer: a shorter command-loss timer recovers faster from a ground counter fault, while a longer one reduces how often an adversary who jams the uplink can push the spacecraft into its recovery posture.