-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate encrypted SRAM for Hardcore mode #6
Comments
@kdecks has wanted something like this for a long time. If I'm understanding correctly, if a |
This would prevent players from importing a save for a set they haven't already played. And if they do start playing after the encrypted SRAM files are supported, they'd only be able to use the encrypted SRAM files. |
What about creating a digital signature of the SRAM file using the user ID? Just hash the SRAM contents, encrypt using the user ID as the key, and save the result. When reading, re-evaluate the digital signature and compare to the one on the file system. I'm not an expert, but I think even SHA-2 + blowfish would provide enough security for this purpose, and there are public domain implementations for both of them available. |
This is not related to the save protection? this issue is clearly visible on gba games, and need to be addressed. |
As a player, I shouldn't be able to artificially be able to boost my gameplay by making changes to the SRAM file.
For any game that has a SRAM file, players can modify that externally, or even internally using the Memory Viewer, then restart the emulator in hardcore mode to take advantage of the changes.
The easiest way to prevent this is to encrypt the SRAM file. For extra security the salt could be the player's
usernameID.For players who have existing SRAM files, we have to be able to grandfather them into the system. I recommend using a new filename for hardcore (i.e.
game.hardcore.sram
) and if it doesn't exist, and the player has agame.sram
, load that instead. Grandfathering a file would require the player having earned achievements for the game prior to supporting encrypted SRAM files.When playing in hardcore mode, if the RAM hasn't been tampered with, the SRAM would be saved as
game.hardcore.sram
using the encryption method described above. If the player has disabled hardcore mode or tampered with RAM, the SRAM would be saved asgame.sram
.It may be desirable to save both
game.sram
andgame.hardcore.sram
in hardcore mode so players can use their SRAM file in other emulators.This solution isn't foolproof. A very creative player could still use an external tool (like a debugger) to modify the RAM without setting the "tampered" flag. Additionally, as the emulators are open source, they could recompile them without the additional security. Finally, as we don't currently require players to use the latest emulators, they could just continue playing with older emulators and not have to worry about the encrypted SRAM files.
The text was updated successfully, but these errors were encountered: