EDAT files: Difference between revisions

From PS3 Developer wiki
Jump to navigation Jump to search
Line 45: Line 45:
|-
|-
| 0x08  || [[License_Types|License Types]]      || 4      || uint32 || for PS2 edat, the FW requires it to be with activation (also a.k.a. Paid content paired with your individual data)
| 0x08  || [[License_Types|License Types]]      || 4      || uint32 || for PS2 edat, the FW requires it to be with activation (also a.k.a. Paid content paired with your individual data)
for [[PKG_files#Misc.2FNote|PS1 PKG]], the FW 4.00 introduced some changes for installing them in regard of the EDAT license type.
*00 Debug / SDAT
*00 Debug / SDAT
*01 Network License: requires network authentication every time . [http://en.wikipedia.org/wiki/PlayStation_Network_outage#Inability_to_use_PlayStation_3_content See inability example]
*01 Network License: requires network authentication every time . [http://en.wikipedia.org/wiki/PlayStation_Network_outage#Inability_to_use_PlayStation_3_content See inability example]
Line 100: Line 101:
| rowspan="21" style="background-color:#123EDA; color:#FFFFFF;" |'''Body'''  
| rowspan="21" style="background-color:#123EDA; color:#FFFFFF;" |'''Body'''  
|-
|-
| 0x100  || Encrypted file      || Variable  ||  || The file is encrypted using  an AES 128 bits algorithm in CBC mode
| 0x100  || Encrypted file      || Variable  ||  || The file is encrypted using  an AES algorithm in CBC mode
|-
|-
| 0x**  || Padding    || Variable  ||  ||
| 0x**  || Padding    || Variable  ||  ||

Revision as of 10:44, 6 September 2013

Info on the talk page

Info on the talk page: please digest the info and move it here

The info on this page is an extract of conversations, forum posts and from the talk page.

Decryption of EDATS

Three ways to do it:

  • act.dat,rif,idps combo
  • rap
  • free content (npdrm1 klic)

Free Content

Simply decrypted with appldr keys and free klic

Using RAP

Overview of steps:

  • Obtain rifkey from rap (flatz's rap2rifkey)
  • Decrypt EDAT using corresponding klic (minis,psxclassics,etc) and rifkey
Structure (Encrypted Format)
Offset Name Size Type Note
Header
0x00 magic 4 uint32 "NPD" (4E 50 44 00)
0x04 version 4 uint32
  • 01
  • 02
  • 03
  • 04
0x08 License Types 4 uint32 for PS2 edat, the FW requires it to be with activation (also a.k.a. Paid content paired with your individual data)

for PS1 PKG, the FW 4.00 introduced some changes for installing them in regard of the EDAT license type.

  • 00 Debug / SDAT
  • 01 Network License: requires network authentication every time . See inability example
  • 02 Local License: requires first time activation on-line (paid content but also demo & free of charge content).
  • 03 Free License: without license check.
0x0B Application Type 4 uint32
0x10 CONTENT ID 48 (0x30) uint8 Content Identificator
0x40 Digest 16 (0x10) uint8 QA digest (seems like to be a SHA-1 hash of the non-finalized file) : hash of the original data which is unknown until the whole file is read, can not be used as check. Can be used as watermark or zeroed on forged file.
0x50 NPD hash 1 16 (0x10) uint8 CID-FN hash (an AES CMAC hash of concatenation of Content ID and File Name using the third NPDRM OMAC key as CMAC key)
0x60 NPD hash 2 16 (0x10) uint8 header hash (an AES CMAC hash of the 0x60 bytes from the beginning of file using xored bytes of the first NPDRM OMAC key and the second NPDRM OMAC key as CMAC key)
0x70 Activation time 8 unkn Start of the validity period, filled with 00 if not used.
0x78 Activation time 8 unkn End of the validity period, filled with 00 if not used.
0x80 NPD type 1 uint8 (Separated from Metadata type for wiki format)
  • 00 Finalized EDAT
  • 01 Finalized SDAT
  • 80 Non Finalized EDAT
  • 81 Non Finalized SDAT
0x83 Metadata type 3 uint8 (Flags description from talk page)
  • 00
  • 01 Compressed?
  • 02 Plain text?
  • 03 Compressed plain text?
  • 05 Compressed?
  • 06 Plain text?
  • 07 Compressed plain text?
  • 0C ?
  • 0D Compressed data?
  • 3C data/misc?
0x84 Segment size 4 uint8 default block is 16384 bytes = 0x4000. Seen also 0x8000.
0x88 Data size 8 uint8 decoded data size
0x90 meta data sections hash 16 (0x10)
0xA0 extended header hash 16 (0x10) An AES CMAC hash of 160 bytes from the beginning of file) uses the hash key as CMAC key and it depends on the file flags and keys
0xB0 Unknown data? 40 (0x28) Possible another unknown signature: zeroed on forged file
0xD8 ECDSA signature 40 (0x28) Enabled (only?) for PS2 classic: all custom firmwares are patched to skip the ECDSA check. Zeroed on forged file.
Body
0x100 Encrypted file Variable The file is encrypted using an AES algorithm in CBC mode
0x** Padding Variable
Footer Structure (Encrypted Format)
Description Size Note
Name 5 "EDATA" or "SDATA"
Space 1 0x20
Revision Version? 8
  • Version 1: "packager"
  • Version 2: "2.4.0.L "
  • Version 2: "2.4.0.W "
  • Version 2: "2.7.0.L "
  • Version 3: "3.3.0.L "
  • Version 3: "3.3.0.W "
  • Version 4: "4.4.0.L "
  • Version 4: "4.4.0.W "
End of the file 2 00 00

Note: Applied for normal ps3 edats and minis.edat