I recently developed an online multiplayer game and it's working fine. There's a central server handling TCP connections with clients, and they both receive and send data.
Is there a way to verify that the data sent hasn't been modified before the receiver reads it?
Does a TCP connection handle it in some way? If not what is the best way (not asking for code) to implement it?
By now I came up with those ideas:
I searched for a common used solution but couldn't find much.
Encryption should be my last option.
Edit
For a simple way to achieve this:
Achieved through a variety of data protection methods, including backup and replication, database integrity constraints, validation processes, and other systems and protocols, data integrity is critical yet manageable for organizations today.
According to the ALCOA principle, the data should have the following five qualities to maintain data integrity: Attributable, Legible, Contemporaneous, Original and Accurate.
Agreed with Bart, you may want to look at using a Hash method for data verification.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With