Changes

260 bytes added ,  05:58, 15 March 2018
note nca2 diff
Line 5: Line 5:  
=Encryption=
 
=Encryption=
 
The first 0xC00 bytes are encrypted with AES-XTS with sector size 0x200 with a non-standard "tweak" (endianness is reversed, see [https://gist.github.com/SciresM/fe8a631d13c069bd66e9c656ab5b3f7f here]), this encrypted data is an 0x400 NCA header + an 0x200 header for each section in the section table.
 
The first 0xC00 bytes are encrypted with AES-XTS with sector size 0x200 with a non-standard "tweak" (endianness is reversed, see [https://gist.github.com/SciresM/fe8a631d13c069bd66e9c656ab5b3f7f here]), this encrypted data is an 0x400 NCA header + an 0x200 header for each section in the section table.
 +
 +
For pre-1.0.0 "NCA2" NCAs, the first 0x400 byte are encrypted the same way as in NCA3. However, each section header is individually encrypted as though it were sector 0, instead of the appropriate sector as in NCA3.
    
=Header=
 
=Header=
Line 23: Line 25:  
| 0x200
 
| 0x200
 
| 0x4
 
| 0x4
| Magicnum "NCA3"
+
| Magicnum (Normally "NCA3", "NCA2" for some pre-1.0.0 NCAs)
 
|-
 
|-
 
| 0x204
 
| 0x204