Editing Trophy00.trp
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 9: | Line 9: | ||
== Structure == | == Structure == | ||
Note: This isn't complete. | |||
typedef unsigned char u8; | |||
typedef unsigned long int u32; | |||
typedef unsigned long long int u64; | |||
typedef struct { | typedef struct { | ||
u32 magic; //"Ü¢M " (0xDCA24D00) | |||
u32 version; //#3 on ps4 (1: PS3, 2: PS3 & PS VITA) | |||
u64 file_size; //size of full trp file | |||
u32 entry_num; //num entries | |||
u32 entry_size; // size of entry | |||
u32 dev_flag; // 1: dev | |||
u8 digest[20]; //sha1 hash | |||
u32 key_index; | |||
u8 padding[0x2C]; | |||
} trp_header; | } trp_header; | ||
typedef struct { | typedef struct{ | ||
signed char entry_name[ | signed char entry_name[0x20]; | ||
u64 entry_pos; //relative to &buffer | |||
u64 entry_len; | |||
u32 flag; //3 on some, 0 on others, could be flags or an enum to determine if encrypted or not? | |||
u8 padding[0xC]; | |||
} trp_entry; | } trp_entry; | ||
Image of Header + Entries: | |||
http://puu.sh/7uOAN/1c17920d61.png | |||
Image of Encrypted Entry Data: | |||
http://puu.sh/7uOEl/6eb00e8a19.png | |||
=== Entries === | === Entries === | ||
Seemes to be 2 types of entries. Encrypted and Non - Encrypted. | |||
Non-Encrypted files seem to be just png image files. | Non-Encrypted files seem to be just png image files. | ||
Line 46: | Line 55: | ||
00000030 CD 96 49 16 B7 9D 1C F4 DE D9 A7 DD FB A0 1A 68 Í–I.·..ôÞÙ§Ýû .h | 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''' | 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: | NP Com ID for above Buffer: CUSA00190_00 | ||
ESFM IV: 0x0 - 0x10 | ESFM IV: 0x0 - 0x10 | ||
{{File Formats}} | {{File Formats}} | ||
<noinclude>[[Category:Main]]</noinclude> | <noinclude>[[Category:Main]]</noinclude> |