Changes

Jump to navigation Jump to search
230 bytes added ,  06:40, 16 October 2012
m
no edit summary
Line 1: Line 1:  
[[Category:File formats]]
 
[[Category:File formats]]
=== Overview ===
+
== Overview ==
 
CIA stands for '''C'''TR '''I'''mportable '''A'''rchive. This format allows the installation titles to the 3DS. CIA files can compile [[NCCH]] files for installation to either the SDMC or CTR NAND. CIA files can also compile .SRL files (format for DS(i) executable images) for installation to the TWL NAND of the 3DS.  
 
CIA stands for '''C'''TR '''I'''mportable '''A'''rchive. This format allows the installation titles to the 3DS. CIA files can compile [[NCCH]] files for installation to either the SDMC or CTR NAND. CIA files can also compile .SRL files (format for DS(i) executable images) for installation to the TWL NAND of the 3DS.  
   Line 9: Line 9:  
Development Units, are capable of manually installing CIA files via the [[3DS Development Unit Software#Dev Menu|Dev Menu]]
 
Development Units, are capable of manually installing CIA files via the [[3DS Development Unit Software#Dev Menu|Dev Menu]]
   −
=== Format ===
+
== Format ==
 
The CIA format has a similar structure to the [http://wiibrew.org/wiki/Wad WAD format].
 
The CIA format has a similar structure to the [http://wiibrew.org/wiki/Wad WAD format].
   Line 18: Line 18:  
The CIA format is capable of containing more then one NCCH in the APP data, the TMD specifies the size of each NCCH contained in the APP data. Generally it will only contain additional NCCH files (.[[NCCH#CFA|CFA]] format, such as the Manual and DLP Child) related to the main executable NCCH (.[[NCCH#CXI|CXI]] format). The CIA format could be interpreted as an installable variant of the [[NCSD|CCI]] format.
 
The CIA format is capable of containing more then one NCCH in the APP data, the TMD specifies the size of each NCCH contained in the APP data. Generally it will only contain additional NCCH files (.[[NCCH#CFA|CFA]] format, such as the Manual and DLP Child) related to the main executable NCCH (.[[NCCH#CXI|CXI]] format). The CIA format could be interpreted as an installable variant of the [[NCSD|CCI]] format.
   −
== CIA Header ==
+
=== CIA Header ===
    
This is a 32 bytes long header (8 x uint32).
 
This is a 32 bytes long header (8 x uint32).
Line 74: Line 74:  
The APP data (NCCH/SRL) is encrypted, using 128-bit AES-CBC. The encryption uses the decrypted titlekey of the ticket, and the titleid padded with zeros as the IV. To get the decrypted titlekey, the titlekey stored in the ticket must be decrypted using 128-bit AES-CBC with the 3DS common key, and the same IV as mentioned previously.  
 
The APP data (NCCH/SRL) is encrypted, using 128-bit AES-CBC. The encryption uses the decrypted titlekey of the ticket, and the titleid padded with zeros as the IV. To get the decrypted titlekey, the titlekey stored in the ticket must be decrypted using 128-bit AES-CBC with the 3DS common key, and the same IV as mentioned previously.  
   −
== Meta ==
+
=== Meta ===
    
The structure of this data is as follows:
 
The structure of this data is as follows:
Line 98: Line 98:     
Obviously this section is not present in TWL CIA files, or any other CIA file which does not contain a [[NCCH#CXI|CXI]].
 
Obviously this section is not present in TWL CIA files, or any other CIA file which does not contain a [[NCCH#CXI|CXI]].
 +
 +
== Tools ==
 +
 +
* [https://github.com/3dshax/ctr/tree/master/ctrtool ctrtool] - Reading/Extraction of CIA files. Supports the use of a Common Key(which is required for decrypting CIA files where the decrypted title key all 'zeros'.
    
== Title Key Encryption ==
 
== Title Key Encryption ==
839

edits

Navigation menu