Closed monoidic closed 3 years ago
Makes sense, also it could be used to restore the Audio-Files when needed (for example if the user cant get the key from system.json)
Also if the user only uses images/audio files in the decryption input form, it could use an image to detect the key automatically instead of the system.json which got more and more protected by the game-devs over the years.
So, as far as I understand it, the files are formatted like this: Bytes 0-15: RPG Maker MV header. Bytes 16-31: The first 16 bytes of a file XOR-ed with a 16-byte key shared across all files in the game. Bytes 32-...: The rest of the file.
Currently, this project supports recovering PNGs without the key, as well-formed PNGs are guaranteed to have the exact same first 16 bytes (
89 50 4E 47 0D 0A 1A 0A 00 00 00 0D 49 48 44 52
). However, this can easily be leveraged to recover the original XOR key, sinceplaintext XOR key == ciphertext
, but alsociphertext XOR plaintext == key
, and we have both the ciphertext (the "encrypted" bytes 16-31 of an encrypted PNG) and the plaintext (those constant first 16 bytes of a PNG). And since the key is shared, users could be directed to decrypt a single .rpgmvp from the game to get the key, which they can use for any of the rest of the files.