rpcs3 icon indicating copy to clipboard operation
rpcs3 copied to clipboard

[Feature Request] Support PFD protected save data

Open MSuih opened this issue 5 years ago • 5 comments

Quick summary

Add some kind of support for save files taken from PS3, which are protected with Protected Files Database files.

Details

Saves (and trophies) on PS3 are hashed and encrypted to prevent users from modifying them. This process of encryption, decryption and hashing automatically handled by firmware and thus transparent to games themselves. On RPCS3, this is currently not implemented and save data is saved to and read from dev_hdd0 as-is.

This forces users to use external programs to decrypt their PS3 saves (like Bruteforce Save Data, which is closed source, windows-only and seems unneccessary complicated for casual use). I think we could implement some kind of built-in support for using PS3 save data on the emulator.

Exporting saves from RPCS3 to PS3 would be a nice feature as well, there is multiple use cases for that. That would require encryption and hash calculation, but on top of that our PARAM.SFO generation needs to be adjusted so that it is identical to what PS3 generates. Or if that is not feasible then a conversion routine should be implemented.

Possible ways to implement this support:

  • Add import(/export?) feature to save manager for users who want to transfer saves between PS3 and RPCS3.
  • Automatically detect PFD files and do same encryption/decryption/hashing steps as is done on real PS3.
    • I don't think it is neccessary for us to encrypt every save done on emulator, but it could be implemented if it doesn't take too much resources.

Resources

https://www.psdevwiki.com/ps3/PARAM.PFD (includes two example saves) https://www.psdevwiki.com/ps3/PS3_Savedata

MSuih avatar Jan 10 '21 07:01 MSuih

Users will continue having problems because the save data use ID from owner console.

Augusto7743 avatar Jan 11 '21 02:01 Augusto7743

It could be made configurable. This is more of a "nice to have" feature that will might remain unimplemented for severial years.

MSuih avatar Jan 11 '21 07:01 MSuih

+1. But what about users who already have copied a savedata file from a ps3 and don't have the .PFD file anymore? Would it be possible to recreate a PFD file (assuming that I have a real ps3 and access to its things like console ID etc.)?

Izofeu avatar Jan 15 '21 01:01 Izofeu

PS2 Uses Sha-3 PS4 Sha-1

Shalashaska

UbiSergei avatar Jan 23 '21 17:01 UbiSergei

Would it be possible to recreate a PFD file?

I have the same question. Essentially, bruteforce savedata, Apollo, and other savedata tools are utilizing a base software called pfd-tools that's a cmd line tool that allows decrypting, encrypting, patching, and more your savedata. But the moment the pfd is deleted or removed, the tool becomes useless, making every attempt to re-encrypt, decrypt, or anything impossible. So, how is a pfd file actually created? I look at information pertaining to it and mostly have been reading about stuff we know about the pfd when it exists. But not a lot about its creation. I guess this question is what gets answered when implementing the feature. And the lack of knowing is why it isn't implemented.

Darkhost1999 avatar May 19 '23 22:05 Darkhost1999