Captured requests that can’t be reused.
Request integrity checks and short expiration windows defeat replayed or tampered calls: a captured request cannot be resent, and any change to its contents invalidates the signature.
1. Replay and tamper, defined
Two attacks target requests in transit. Replay captures a valid request and resends it — draining an account by repeating a transfer, for instance. Tampering alters a captured request — changing an amount or a target id — and forwards it. Authentication alone stops neither: a replayed request carries a valid credential, and a tampered one may too if the changed field is not protected.
2. The defenses, together
Three controls compose into a complete defense:
- a signature over the full payload, so any change invalidates the request;
- a timestamp and short expiry window, so a captured request is stale within seconds or minutes;
- a nonce the server remembers for that window, so even an in-window replay is rejected as a duplicate.
// reject if any holds true
if (now - request.timestamp > window) reject("expired");
if (seen.contains(request.nonce)) reject("replay");
if (!ConstantTimeEquals(expectedSig, request.sig)) reject("tampered");3. How B5 Secure handles it
B5 Secure builds integrity, expiry, and replay prevention into its signed schemes, with constant-time signature comparison to avoid timing leaks. A captured request is useless once its window passes or its nonce is spent, and a tampered one never verifies — defeating man-in-the-middle and replay as a property of the pipeline.