- Joined
- Feb 6, 2014
- Messages
- 2,466
Do save/load codes use checksum (CRC?) or do they use a hashing algoritm (MD5)?
Example, let's say my save/load code is "L7%" which when converted to binary, let's say the result is (each character is 7 bits)
0001010 1100100 0110111 and the first 10 bits refer to the player's total gold while the remaining 11 bits refers to the player's kill count.
The problem is, if players intentionally changes the code to "L8%", then the player's kill count changes to a significantly higher value. Question is, what's the best way to detect if the code is valid. Are checksums good enough? If yes, what checksum should I use? I don't like CRC due to the high computation requirement. Also, it feels like checksums would fail at intentional changes in the code. Just look at Longitudinal Parity for example, if players change the code to "L%7" then it would fail to detect the error.
TL;DR I need help in making save/load codes that can detect the validity of itself.
EDIT: I need a way to implement a digital signature.
Example, let's say my save/load code is "L7%" which when converted to binary, let's say the result is (each character is 7 bits)
0001010 1100100 0110111 and the first 10 bits refer to the player's total gold while the remaining 11 bits refers to the player's kill count.
The problem is, if players intentionally changes the code to "L8%", then the player's kill count changes to a significantly higher value. Question is, what's the best way to detect if the code is valid. Are checksums good enough? If yes, what checksum should I use? I don't like CRC due to the high computation requirement. Also, it feels like checksums would fail at intentional changes in the code. Just look at Longitudinal Parity for example, if players change the code to "L%7" then it would fail to detect the error.
TL;DR I need help in making save/load codes that can detect the validity of itself.
EDIT: I need a way to implement a digital signature.
Last edited: