EmuNewz Network
Savedata Encryption/Decryption - Printable Version

+- EmuNewz Network (https://www.emunewz.net/forum)
+-- Forum: PSP Emulation (https://www.emunewz.net/forum/forumdisplay.php?fid=191)
+--- Forum: JPCSP Official Forum (https://www.emunewz.net/forum/forumdisplay.php?fid=51)
+---- Forum: svn trunk discussion (https://www.emunewz.net/forum/forumdisplay.php?fid=56)
+---- Thread: Savedata Encryption/Decryption (/showthread.php?tid=3673)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12


RE: Savedata Encryption/Decryption - popsdeco - 10-28-2013

bah... as I said before, my test environment is poor...

so, basically, should I clear SAVEDATA_PARAMS and generate hash of PARAM.SFO (after clearing)?

I have tried but the hash computed doesn't get the same as original's.
https://github.com/cielavenir/psp-savedata-endecrypter/commit/7a7caa9028acb5fb43d5ae48c118659eaedef46f


RE: Savedata Encryption/Decryption - Hykem - 10-28-2013

(10-28-2013, 08:48 AM)popsdeco Wrote: bah... as I said before, my test environment is poor...

so, basically, should I clear SAVEDATA_PARAMS and generate hash of PARAM.SFO (after clearing)?

I have tried but the hash computed doesn't get the same as original's.
https://github.com/cielavenir/psp-savedata-endecrypter/commit/7a7caa9028acb5fb43d5ae48c118659eaedef46f

The hashing process should go like this:
1 - Generate a plain unencrypted PARAM.SFO. For example, if you're using a PARAM.SFO from PSP SAVEDATA (e.g.: from gamefaqs.com), all you have to do is clear the SAVEDATA_PARAMS field.
2 - Write this file.
3 - Re-open this file and compute the hashes using the file data as input.
4 - Re-write the SAVEDATA_PARAMS of the file with the hashes now.

In theory, this should work and the hashes should now represent the PARAM.SFO data, but I still need to test further.


RE: Savedata Encryption/Decryption - popsdeco - 11-02-2013

Is re-opening important? I should be able to calculate hash using memory buffer (after clearing SAVEDATA_PARAMS) right?


RE: Savedata Encryption/Decryption - Hykem - 11-04-2013

(11-02-2013, 07:04 PM)popsdeco Wrote: Is re-opening important? I should be able to calculate hash using memory buffer (after clearing SAVEDATA_PARAMS) right?

No, you may use it directly from the memory buffer.
By the way, I've applied a new batch of changes to the SAVEDATA algorithm in r3408. This time the 0x20 hash (the only one that doesn't depend on fuse ID) is matching the one from a real PSP, so I hope I finally got this right. Smile


RE: Savedata Encryption/Decryption - serio - 11-05-2013

while i'm not sure about the other games, valkyria chronicles 2 finally starts fine with the crypto mode enabled in 3408 (it didn't last time i tried, though that was a while ago). it creates the savefile correctly, then loads and saves into it without getting any corruption+deletion it did before.

a savefile created on a psp works fine in jpcsp, although jpcsp's save still can't be loaded on the psp.

is it possible this game has some kind of protection from using savefiles created on other machines, which jpcsp ignores but a real psp doesn't? or maybe it's because the game splits its save data into several smaller files.


RE: Savedata Encryption/Decryption - popsdeco - 11-10-2013

serio,

Perhaps that means jpcsp's PARAM.SFO is still incorrect. Keeping C port up to date is quite hard, so maybe we need Java test app...


RE: Savedata Encryption/Decryption - Hykem - 11-11-2013

@serio
Thanks for testing and reporting.
Unfortunately I didn't test the changes with split SAVEDATA files. If the SAVEDATA folder contains data divided into several files, the PARAM.SFO will have their names and keys. This, of course, will change the final PARAM.SFO hashes, so it's possible that there's an issue with that.

@popsdeco
Indeed. I'll see if I can write a small app to fully test all the steps of the algorithm. Wink


RE: Savedata Encryption/Decryption - onelight - 11-16-2013

@Hykem
Thank you
for older jpcsp(older than r3403 I thank), if I want to use PSP read jpcsp's savedata I must use magicsave and UltraEdit to fix the savedata as jpcsp's savedate is bigger or smaller than psp. but now I just need magicsave.
download MagicSave and src http://pan.baidu.com/share/link?shareid=3945917249&uk=2282369784
abort savedata fix(Chinese) http://blog.sina.com.cn/s/blog_91c98ddb0101q73c.html

Test jpcsp 3408, Sword Art Online [NPJH-50701]
I have check the "Handle SAVEDATA in crypto mode" and then jpcsp can save savedata but can not read the savedata, PPSSPP can read it , psp can read it also (need MagicSave fix it)


RE: Savedata Encryption/Decryption - Hykem - 11-23-2013

(11-16-2013, 01:39 AM)onelight Wrote: @Hykem
Thank you
for older jpcsp(older than r3403 I thank), if I want to use PSP read jpcsp's savedata I must use magicsave and UltraEdit to fix the savedata as jpcsp's savedate is bigger or smaller than psp. but now I just need magicsave.
download MagicSave and src http://pan.baidu.com/share/link?shareid=3945917249&uk=2282369784
abort savedata fix(Chinese) http://blog.sina.com.cn/s/blog_91c98ddb0101q73c.html

Test jpcsp 3408, Sword Art Online [NPJH-50701]
I have check the "Handle SAVEDATA in crypto mode" and then jpcsp can save savedata but can not read the savedata, PPSSPP can read it , psp can read it also (need MagicSave fix it)

Could you please check if Sword Art Online is saving and loading with crypto mode in r3410? Thanks! Smile


RE: Savedata Encryption/Decryption - onelight - 11-24-2013

[/quote]
Could you please check if Sword Art Online is saving and loading with crypto mode in r3410? Thanks! Smile
[/quote]

Test r3412 Sword Art Online is saving and loading with crypto mode in r3412. But not all the game can saving and loading with crypto mode

Test Monster Hunter Portable 3rd , jpcsp r3412 can loading with crypto mode but can't loading with crypto mode (Eorror 0x80110385)
I try to use Decryption mode to save but get Eorror "ゲームデータが壊れています。" and the game ask me delete the save , after I pressing the O button to delete save JPCSP stop there. yet JPCSP had delete the file ICON0.PNG, PIC1.PNG and PARAM.SFO but not MHP3RD.BIN and ULJM05800 folder. I try to delete MHP3RD.BIN myself but failed as JPCSP is already use it. I need delete the save when JPCSP is runing .

In PSP , if the game ask you delete the save ,and you pressing the O button , you can see all the PSP game save in you PSP and you can chose which save to delete.

JPCSP can delete save but can't delete the game save which is running and it will not ask you " do you want to delete this save " before you delete the save.