-
Notifications
You must be signed in to change notification settings - Fork 26
Save Data Encryption
Beside the native PSP encryption there is a second layer of encryption for save data in Monster Hunter Freedom Unite, Monster Hunter Portable 2nd G and Monster Hunter Portable 3rd.
###Format The save data has a footer containing the 20 byte SHA1 hash followed by 32 bit integer seed used for the XOR cipher.
###Encryption First a hash is made of the unencrypted save data excluding the last 12 bytes and including a salt string. The hash is then appended to the save data and a substitution cipher is applied. Next the save data with the hash is encrypted using the same process as the [DATA.BIN](DATA.BIN Encryption) file but with a random XOR seed. The substitution cipher is then applied twice to the XOR seed and that gets appended to the save data and hash.
###Game Functions
The save data encryption is handled by a thread named calcSumThread and the decryption is handled by a thread named checkSumThread. There is also a thread named checkSumThread2G in Monster Hunter Portable 3rd for importing save data from Monster Hunter Portable 2nd G.