TZH-nh/moonwire/replay does not have a README file

    ReplayWindow

    pub struct ReplayWindow {
    // private fields
    } derive(Eq,
    Debug
    )

    RFC 6479 2048-packet anti-replay window without bit-shifting across words. Separates read-only pre-decryption check(counter) from post-AEAD-authentication accept(counter) so unauthenticated packets can never advance or poison the window.

    ReplayWindow::accept

    fn ReplayWindow::accept(self : ReplayWindow, counter : UInt64) -> Bool

    Record counter as seen AFTER AEAD authentication succeeds. Returns true if newly accepted, or false if replayed / out-of-window / above ceiling.

    ReplayWindow::check

    fn ReplayWindow::check(self : ReplayWindow, counter : UInt64) -> Bool

    Read-only pre-check before AEAD decryption: returns true iff counter is within valid bounds and not yet marked seen.

    ReplayWindow::highest_counter

    fn ReplayWindow::highest_counter(self : ReplayWindow) -> UInt64?

    Highest authenticated packet counter observed so far (None if no packet accepted yet).

    ReplayWindow::new

    Create a fresh empty anti-replay window.

    ReplayWindow::reset

    fn ReplayWindow::reset(self : ReplayWindow) -> Unit

    Reset the anti-replay window (e.g. when rotating to a new session).

    REJECT_AFTER_MESSAGES

    let REJECT_AFTER_MESSAGES : UInt64

    WireGuard Reject-After-Messages ceiling (2^64 - 2^13 - 1, WireGuard §6.1).

    WINDOW_SIZE

    let WINDOW_SIZE : UInt64

    WireGuard anti-replay sliding window width in packets (RFC 6479 / WireGuard COUNTER_WINDOW_SIZE = 2048).

    Source Files