Patent ID: 10193925

Abstract:
An anti-replay method and apparatus are provided. The same maximum agreed value is set at a transmit end and a receive end. The receive end receives an Internet Protocol Security (IPSec) packet, where the IPSec packet includes a sequence number, and acquires an upper limit value of an anti-replay sliding window. If the upper limit value of the anti-replay sliding window is the maximum agreed value, the receive end sets an interval of the anti-replay sliding window to M1 to M2, where M1 is a minimum value of the packet sequence number, and M2 is a sum of M1 and a size of the anti-replay sliding window. When a sequence number of a packet sent by the transmit end reaches a maximum value, a sequence number of a next sent packet starts from the minimum value, thereby resolving a problem that a packet is falsely discarded because of anti-replay.