Robsutar / lyanne

Tick-based communication library for server-client architectures.
Apache License 2.0
1 stars 0 forks source link

Replay attacks in auth_tcp and auth_tls #1

Open Robsutar opened 1 month ago

Robsutar commented 1 month ago

The auth_tcp and auth_tls features use an authenticator to exchange keys between the server and clients, and use them along with nonces to encrypt all packets. Packets are also assigned an incremental ID, which rotates as it approaches 16,000 (half the maximum size of u16), a replay attack can be issued, as the ID rotates.

A replay attack occurs when an attacker intercepts and resends a valid data transmission to trick the receiver into accepting duplicate or previously processed data as new.

Last related commit: 1ac8646.