Changes

441 bytes added ,  01:54, 20 June 2012
no edit summary
Line 1: Line 1:  
[[Category:File formats]]
 
[[Category:File formats]]
 
=== Overview ===
 
=== Overview ===
CIA stands for '''C'''TR '''I'''mportable '''A'''rchive. These files contain a compiled application which can be installed on CTR NAND, TWL NAND (part of the NAND used by DSi applications) and on the SD card.
+
CIA stands for '''C'''TR '''I'''mportable '''A'''rchive. This format allows the installation titles to the 3DS. CIA files can compile a CXI 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.  
    
An example .CIA can be downloaded [http://sherer.co.il/3ds/cia/Sample%20Cia/ here] Credit: [[User:Jl12|Jl12]]. It includes a .cia file, the .cia file in its extracted form, a screenshot of the application working and some information given by the 3DS.
 
An example .CIA can be downloaded [http://sherer.co.il/3ds/cia/Sample%20Cia/ here] Credit: [[User:Jl12|Jl12]]. It includes a .cia file, the .cia file in its extracted form, a screenshot of the application working and some information given by the 3DS.
 +
 +
[[Download Play]] utilises the CIA format when transferring titles.(This is also the only know retail use of the CIA format)
 +
 +
Development Units, are capable of manually installing CIA files via the [[3DS Development Unit Software#Dev Menu|Dev Menu]]
    
=== Format ===
 
=== Format ===
Line 59: Line 63:  
|}
 
|}
   −
The order of the sections in the header also is the order of them in the CIA file:
+
The order of the sections in the CIA file:
 
* certificate chain
 
* certificate chain
 
* Ticket
 
* Ticket
 
* TMD file data
 
* TMD file data
 
* APP file data
 
* APP file data
* Icon - (is not a necessary component and can be removed without altering the validity of the file)
+
* Icon
The APP data can be either encrypted or cleartext, retail [[Download Play]] CIAs' APP data is always encrypted.
+
 
 +
The APP data (CXI/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.  
    
== Icon ==
 
== Icon ==
 
The actual [[SMDH|icon]] data in a CIA is 0x400 bytes smaller than described in header and the true offset is 0x400 bytes past the TMD,
 
The actual [[SMDH|icon]] data in a CIA is 0x400 bytes smaller than described in header and the true offset is 0x400 bytes past the TMD,
839

edits