Resources | Entersekt

Replay protection

Written by Entersekt | Apr 2, 2026, 1:30:00 PM

Replay protection is a security control that prevents an attacker from capturing a valid authentication message, API request or transaction instruction and submitting it again. The original request may be genuine, correctly signed and properly authenticated. The danger is that it remains usable after its first submission.

In banking and payments, replay protection helps ensure that a transfer approval, login response, payment authorization or session artifact is accepted only in the intended context, within the intended time window and, where necessary, only once. It is a foundational control for transaction security, authentication and fraud prevention.

Key takeaways: Replay protection

  • A valid message is not necessarily a fresh one.
  • Replay protection checks that an authentication response or payment approval belongs to the intended session or transaction.
  • The response or approval must remain within its validity window and, where required, must not have already been used.
  • Expiration alone does not prevent reuse within the validity window.

Why replay attacks matter

A replay attack does not always require an attacker to forge a message or steal a cryptographic key. An attacker may instead capture a valid message while it is being transmitted, stored or processed, then resend it later. If the receiving system checks authenticity but not freshness or prior use, it may treat the repeated message as a new instruction.

For example, consider a payment approval that says “approve a transfer of $500.” If the approval is valid but is not bound to a unique transaction, an attacker may try to submit the same approval again. The same pattern can affect:

  • One-time passwords and out-of-band approval codes.
  • Digital signatures and authentication assertions.
  • API requests and OAuth access or refresh tokens.
  • Payment authorizations, account changes and money transfers.
  • Session identifiers and other short-lived security artifacts.

How replay protection works

Replay-resistant designs give the verifier a way to distinguish a fresh request from an old one. The exact mechanism depends on the protocol, but the central idea is consistent: a valid message must be tied to a unique challenge, a limited validity period, a specific session or the exact transaction being approved.

Nonces and unique challenges

A nonce is a value intended to be used once. The verifier generates a sufficiently unpredictable nonce or challenge and requires the authenticator or client to include it in the response. A previously captured response will not contain the current challenge, so it can be rejected.

A nonce must be generated with an appropriate source of randomness, tracked or otherwise verifiable, and protected from reuse. A predictable, repeated or improperly scoped nonce can weaken the control.

One-time use and state tracking

Some systems prevent replay by marking a token, code or request identifier as consumed after successful use. The verifier then rejects a second attempt, even if the artifact has not yet expired.

State tracking is particularly important for one-time passwords, recovery codes, approval links and asynchronous push or out-of-band workflows. Expiration alone is not enough if an attacker can use an intercepted artifact more than once during its validity period.

Freshness and time limits

Short validity windows reduce the opportunity to reuse a captured message. Timestamps, expiration times and narrowly defined acceptance windows can help, but they must account for clock drift, network delay and processing time. Time checks should normally be combined with a nonce, transaction identifier or consumed-state check rather than used as the only defense.

Binding the response to the session

A response can be bound to the specific authenticated channel, client session, verifier or relying party. This limits the value of a captured response because it cannot be transferred to a different session or endpoint.

Modern cryptographic authentication protocols use challenge-response exchanges and, in some cases, channel or verifier-name binding. NIST defines replay resistance as making it impractical to achieve successful authentication by recording and replaying a previous authentication message. It identifies nonces, challenges and timeliness data as common ways to prove transaction freshness.

Binding the approval to the transaction

Authentication proves that a user or authenticator participated in an interaction. It does not automatically prove what the user intended to approve. For high-risk actions, the approval should be cryptographically or logically bound to material transaction details such as:

This distinction matters in banking. A stolen approval for one transaction should not be transferable to another transaction, and a change to the payment details should invalidate the original approval.

Replay protection in authentication

Replay resistance is different from simply encrypting a connection. Transport encryption helps prevent unauthorized parties from reading or modifying traffic in transit, but a valid message may still be captured before it enters the protected channel or extracted from an endpoint. The authentication protocol itself therefore needs freshness and context checks.

One-time passwords can provide replay resistance when the verifier accepts a given code only once during its validity period. Cryptographic authenticators can provide replay resistance by signing a verifier-generated challenge. Passwords, by contrast, are not replay-resistant because the same secret is submitted repeatedly.

Replay resistance also supports phishing-resistant authentication, but the concepts are not identical. Replay resistance prevents reuse of a previously captured valid message. Phishing resistance aims to prevent an impostor verifier from obtaining a usable authenticator output in the first place. A strong authentication design should consider both properties.

Replay protection in payments and digital banking

In digital banking, a customer may authenticate at login and then perform several high-risk actions. A successful login should not create unlimited trust for every subsequent instruction. Risk can change during a session, and fraud often occurs after initial authentication through account changes, new beneficiaries, push payments, wires or real-time transfers.

Replay protection should therefore operate at the point where a sensitive action is approved, not only at login. A risk-aware transaction flow can combine:

  • A unique transaction challenge.
  • Fresh authentication or step-up authentication when risk warrants it.
  • Binding between the approval and transaction details.
  • Device, channel, behavioral and location signals.
  • Strict expiration and single-use enforcement.
  • Clear audit records showing what was approved, when and how.

In card-not-present payments, EMV 3-D Secure supports authentication and data exchange between merchants, acquirers, issuers and cardholders. Payment authentication should still ensure that an authentication result is associated with the correct transaction and cannot be reused outside its intended context.

Replay protection and common security controls

Control What it addresses Important consideration
Nonce or challenge Detects whether a response was created for the current request Must be unique, unpredictable and correctly scoped
Expiration time Limits how long an artifact remains valid Does not necessarily prevent repeated use within the time window
Single-use state Rejects a token, code or request after consumption Requires reliable storage and race-condition controls
Transaction binding Prevents an approval being moved to another transaction Bind all material fields, not only a generic transaction label
Channel or verifier binding Limits use to the intended session or relying party Requires correctly authenticated endpoints and protocol support
Rate limiting Reduces guessing and repeated submission attempts Supports replay defenses but does not replace freshness checks
Risk-based decisioning Identifies unusual context around a valid request Should complement, not substitute for protocol-level replay controls

Implementation considerations

Replay protection is a system property, not a single checkbox. Security and engineering teams should test the full request lifecycle, including retries, duplicate delivery, parallel requests, failover, queues, caching and recovery workflows.

  1. Define what must be unique. Decide whether uniqueness applies to the authentication event, transaction, session, device, message or combination of fields.
  2. Generate and validate freshness data. Use a strong nonce, challenge, counter or timestamp strategy appropriate to the protocol.
  3. Make consumption atomic. Ensure two concurrent requests cannot both pass a “not yet used” check.
  4. Bind approvals to intent. Include the exact action and material transaction data in the signed or verified content.
  5. Handle retries safely. Distinguish a safe idempotent retry from a second attempt to execute a completed financial action.
  6. Log and alert on duplicates. A rejected replay may be an important fraud signal, especially when it occurs across devices, locations or channels.
  7. Test negative cases. Attempt reuse after success, after expiration, in another session, with changed transaction details and through parallel submissions.

Replay protection vs. related concepts

  • Replay protection vs. encryption

    Encryption protects confidentiality. Replay protection protects freshness and prevents reuse. Encrypted messages can still be replayed if the receiving system does not validate uniqueness or context.

  • Replay protection vs. authentication

    Authentication verifies a claimant, device or service. Replay protection verifies that the authentication message or instruction is fresh and intended for the current interaction. Authentication without replay resistance can leave a valid old response reusable.

  • Replay protection vs. idempotency

    Idempotency is an application behavior that makes repeated requests produce the same result rather than duplicate an operation. It is useful for safe API retries, but it is not a complete authentication control. Financial systems generally need both authenticated, replay-resistant instructions and carefully designed idempotent processing.

Frequently asked questions

➡️ What is an example of a replay attack?

An attacker captures a valid one-time approval or signed payment request and submits it again after the original request has been accepted. If the system does not check whether the request was already used or bind it to a unique transaction, the repeated request may be processed.

➡️ Does a one-time password prevent replay attacks?

It can, when the verifier accepts each code only once and enforces an appropriate validity period. A one-time password does not eliminate every risk, including phishing or real-time relay attacks, so it should be assessed alongside the broader authentication protocol.

➡️ Are passkeys resistant to replay attacks?

Passkeys based on FIDO2 and WebAuthn use cryptographic challenge-response protocols and verifier-name binding, which are designed to prevent captured authentication responses from being reused at another time or by an impostor relying party. Correct implementation and secure account recovery remain essential.

➡️ Can replay protection stop authorized payment scams?

Replay protection can stop reuse of a legitimate approval, but it does not by itself determine whether a customer was manipulated into approving a fraudulent transaction. Scam prevention also requires transaction risk analysis, intent validation, behavioral signals and controls that can detect suspicious activity after login.

➡️ Replay protection in a modern fraud prevention strategy

Replay protection closes a specific gap: the gap between a message being valid and a message being valid now, here and for this transaction. Financial institutions should combine protocol-level freshness with contextual risk analysis and adaptive authentication so that high-risk actions receive the right level of verification without adding friction to every customer interaction.

For a broader view of how this works across digital banking and payments, explore context-aware authentication and real-time transaction decisioning, passkey-based browser authentication and biometric authentication using FIDO standards.

Sources and related articles