Line 2: |
Line 2: |
| '''Title metadata''' is a format used to store information about a title (installed title, DLC, etc.) and all its installed contents, including which contents they consist of and their SHA256 hashes. | | '''Title metadata''' is a format used to store information about a title (installed title, DLC, etc.) and all its installed contents, including which contents they consist of and their SHA256 hashes. |
| | | |
− | [http://git.daifukkat.su/?p=3dshax.git Code is available] by trap15 to parse the available information from the 3DS format of TMDs. | + | [https://bitbucket.org/trap15/3dshax Code is available] by trap15 to parse the available information from the 3DS format of TMDs. |
| | | |
| == Structure == | | == Structure == |
| | | |
− | All the data in the file represented in Big Endian. | + | All the data in the file represented in Big Endian, unless otherwise noted. |
| | | |
| {| class="wikitable" | | {| class="wikitable" |
Line 21: |
Line 21: |
| | 0x9C4 + Y||0x30*ContentCount||Content Chunk Records. | | | 0x9C4 + Y||0x30*ContentCount||Content Chunk Records. |
| |} | | |} |
| + | |
| + | Y denotes the total size of the "Signature Data" section and depends on the signature type. |
| | | |
| === Signature Data === | | === Signature Data === |
− | The total size of this section is referred to as "Y" in the overall TMD structure. The signature is of the header of the TMD.
| + | The signature is of the header of the TMD. |
| {| class="wikitable" | | {| class="wikitable" |
| | align="center" style="background:#f0f0f0;"|'''Offset''' | | | align="center" style="background:#f0f0f0;"|'''Offset''' |
Line 37: |
Line 39: |
| | | |
| ==== Signature Type ==== | | ==== Signature Type ==== |
− | {| class="wikitable" | + | {{Signature Types}} |
− | |-
| + | The hash for the signature, is calculated over the header of the TMD |
− | ! Value
| |
− | ! Signature Method
| |
− | ! Signature Size (X)
| |
− | |-
| |
− | | 0x010000
| |
− | | RSA_4096 SHA1
| |
− | | 0x200
| |
− | |-
| |
− | | 0x010001
| |
− | | RSA_2048 SHA1
| |
− | | 0x100
| |
− | |-
| |
− | | 0x010002
| |
− | | Elliptic Curve
| |
− | | 0x40
| |
− | |-
| |
− | | 0x010003
| |
− | | RSA_4096 SHA256
| |
− | | 0x200
| |
− | |-
| |
− | | 0x010004
| |
− | | RSA_2048 SHA256
| |
− | | 0x100
| |
− | |}
| |
| | | |
| === Header === | | === Header === |
Line 89: |
Line 67: |
| | 0x58||0x2||Group ID | | | 0x58||0x2||Group ID |
| |- | | |- |
− | | 0x5A||0x3C||Reserved | + | | 0x5A||0x4||Save Data Size in Little Endian (Bytes) (Also SRL Public Save Data Size) |
| + | |- |
| + | | 0x5E||0x4||SRL Private Save Data Size in Little Endian (Bytes) |
| + | |- |
| + | | 0x62||0x4||Reserved |
| + | |- |
| + | | 0x66||0x1||SRL Flag |
| + | |- |
| + | | 0x67||0x31||Reserved |
| |- | | |- |
| | 0x98||0x4||Access Rights | | | 0x98||0x4||Access Rights |
Line 123: |
Line 109: |
| |- | | |- |
| | 0x04 | | | 0x04 |
− | | 32 | + | | 0x20 |
| | SHA-256 hash of the next k content records that have not been hashed yet | | | SHA-256 hash of the next k content records that have not been hashed yet |
| |} | | |} |
Line 174: |
Line 160: |
| | DLP Child Container (.[[NCCH#CFA|CFA]]) | | | DLP Child Container (.[[NCCH#CFA|CFA]]) |
| |} | | |} |
| + | |
| + | This does not apply to DLC. |
| | | |
| ==== Content Type flags ==== | | ==== Content Type flags ==== |