PS4 CFW and Hacks       Thread starter PSXHAX       261       0
Not open for further replies.


Staff Member
Today PlayStation 4 homebrew developer Red-EyeX32 has made available a PlayStation 4 Trophy (PS4 .TRP File) Extractor similar to the previous PS3 and PS Vita tools from Red Squirrel with details below.

Download: Red-EyeX32_-_Playstation_4_Trophy_Extractor.rar / Red-EyeX32_-_Playstation_4_Trophy_Extractor.rar (Mirror)

To quote: Sup guys, Just a little thing I had been working on for quite some time now. This here will let you extract PlayStation 4 .trp files and extract the files in the container. There are mostly .png and .esfm files inside the container. All the .esfm files are encrypted from what I have seen which needs more further investigation.

I have been working with intelligent people trying to get these files decrypted. From what I have heard .esfm files are encrypted .xml files just like how PS3's trophy files were. Anyways here's a pic of the tool.

Thanks to Jakes625 for being helpful :)

Finally, from Wololo: TRP files are a fairly simple container with a header describing the content of the files (similar to a tar file or an uncompressed zip). The tool is a straightforward GUI that runs a command line application which is in charge of the unpacking process.

For those of you who want to dig deeper or create their own tool to extract these files, Red-EyeX32 has conveniently updated the PS4 dev wiki with some information about the TRP format:
typedef unsigned long int u32;
typedef unsigned long long int u64;
typedef struct{
    u32 magic; //Ü¢M.
    u32 version; //#3 on ps4
    u64 fileSize; //size of full trp file
    u32 entryCount; //num entries
    u32 entrySize; // size of entry
    u32 unk1; //padding probably
    u8 hash[20]; //sha1 hash
    u32 unk2; // 0x30313000 ??
    u8 padding[0x2C];
} header_t
typedef struct{
    signed char name[0x20];
    u64 entryStart; //relative to &buffer
    u64 entryLength;
    u32 unk1; //3 on some, 0 on others, could be flags or an enum to determine if encrypted or not?
    u8 unk2[0xC];
} entry_t;
Trophy files contain some information related to the trophies of your games, including png icons (which are *not* encrypted), and esfm files (which *are* encrypted)

You can apparently grab TRP files directly from retail PS4 game Blu-ray discs, although I have yet to try.


Seemes to be 2 types of entries. Encrypted and Non - Encrypted. Non-Encrypted files seem to be just png image files. Encrypted files seem to be just ESFM files, (encrypted container for trophy.sfm files)

Each ESFM file in the .trp file contain the same first 512 bits.
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00000000  0B 29 DE DE CB D5 62 61 C6 5C 75 24 9B 0C A4 08  .)ÞÞËÕbaÆ\u$›.¤.
00000010  0E 40 AE C1 7C 92 1F 1E 6D D7 B6 CC 59 2D DB B8  [email protected]®Á|’..m׶ÌY-Û¸
00000020  5C 26 E7 9E 3F F6 54 9E A2 E4 94 2F 58 7F D6 9D  \&çž?öTž¢ä”/X.Ö.
00000030  CD 96 49 16 B7 9D 1C F4 DE D9 A7 DD FB A0 1A 68  Í–I.·..ôÞÙ§Ýû .h
ESFM is just an encrypted XML format. It consists of IV of 0x10 bytes and the data itself. A key is generated by encrypting NP communication ID with keygen ERK/keygen IV (stored inside system library) using AES-CBC-128. Then you can decrypt data using this key and IV from the header.
NP Com ID for above Buffer: CUSA00190_00
ESFM IV: 0x0 - 0x10
Not open for further replies.
Recent Articles
PCSX-R Emulator PS4 Port Crash Bandicoot & Resident Evil PSOne Demos
Since the mGBA Emulator PS4 port and Yabause Sega Saturn Emulator PS4 port, PlayStation 4 homebrew developer Znullptr worked on a PCSXR (CodePlex Archive) PS4 port of the PlayStation emulator...
PS4 Puzzle Platformer Etherborn Shifts Onto PlayStation 4 Next Week
Last month we saw a MGS HD Remake made in Dreams on PlayStation 4, and in similar fashion comes an elegant leap in the gravity-puzzle genre... environmental puzzle platformer known as Etherborn...
Final Fantasy XIV (FFXIV) PS4 Screenshot Retimer Script by Skydeo
Following the Final Fantasy XIV: Stormblood and recent Final Fantasy XIV: Shadowbringers Final Fantasy XIV Online PS4 expansion pack comes a FFXIV PS4 Screenshot Retimer Python Script by Skydeo to...
Telefrag VR Blazes to PlayStation VR July 19th, PS4 Gameplay Trailer
Fans of Quake-style arena shooters will be pleased to hear that Telefrag VR by Anshar Studios is blazing onto PlayStation VR this July 19th featuring fast-paced PvP virtual reality game action in...