Ancurio / mkxp

Free Software implementation of the Ruby Game Scripting System (RGSS)
GNU General Public License v2.0
515 stars 131 forks source link

Use encrypted RTP #155

Closed pulsejet closed 7 years ago

pulsejet commented 7 years ago

In creating a custom build, what would be the best practice for mounting an encrypted archive as an RTP without performance losses? I just mean simple encryption, with the key hard coded into the binaries (the reason being to protect the audio files).

carstene1ns commented 7 years ago

Not saying this is a good idea to encrypt game data at all, but if I had to do it... One way to do it for mkxp (reading the src/rgssad.* files) would be to add your own archive format to physfs to apply some XOR key to each archive it opens/reads, like it is done for the normal encrypted rgssad archives. This should not need further changes to mkxp and you only have to encrypt your archive with the new secret key.

Ancurio commented 7 years ago

The above two are mutually exclusive.
I don't believe PhysFS comes with support for any encrypted formats by default (reading of password protected zips could probably be added, not sure about the complexity of that task). So the only "encryption" available in vanilla mkxp is rgssad. I have a small bash utility to create rgssad / rgss3a archives that I can give you. If you change the XOR keys in both mkxp and the utility, it'd even be "safe" from conventional rgssad unpackers.

pulsejet commented 7 years ago

I'll close this then, since its a bit unrealistic

khkramer commented 6 years ago

@Ancurio

Do you still have this bash script? I'm packing my rgssad with another tool currently ( with a different key set also in the mkxp source ) but I'm getting Marshal version errors which I'm guessing is due to the utility generating a ruby 1.8 compatible format

Ancurio commented 6 years ago

http://ancurio.bplaced.net/mkxp/ttm_pack/ttm_pack.c