NCA: Difference between revisions

No edit summary
(2 intermediate revisions by the same user not shown)
Line 29: Line 29:
| 0x204
| 0x204
| 0x1
| 0x1
| Distribution Type (0 = System NCA, 1 = Gamecard NCA)
| Distribution Type (0x00 = System NCA, 0x01 = Gamecard NCA)
|-
|-
| 0x205
| 0x205
| 0x1
| 0x1
| Content Type (0 = Program, 1 = Meta, 2 = Control, 3 = Manual, 4 = Data, 5 = PublicData)
| Content Type (0x00 = Program, 0x01 = Meta, 0x02 = Control, 0x03 = Manual, 0x04 = Data, 0x05 = PublicData)
|-
|-
| 0x206
| 0x206
| 0x1
| 0x1
| Old Key Generation (0 = [[1.0.0]], 2 = [[3.0.0]])
| Old Key Generation (0x00 = [[1.0.0]], 0x01 = Unused, 0x02 = [[3.0.0]])
|-
|-
| 0x207
| 0x207
| 0x1
| 0x1
| Key Area Encryption Key Index (0 = Application, 1 = Ocean, 2 = System)
| Key Area Encryption Key Index (0x00 = Application, 0x01 = Ocean, 0x02 = System)
|-
|-
| 0x208
| 0x208
Line 61: Line 61:
| 0x220
| 0x220
| 0x1
| 0x1
| Key Generation (3 = [[3.0.1]], 4 = [[4.0.0]], 5 = [[5.0.0]])
| Key Generation (0x03 = [[3.0.1]], 0x04 = [[4.0.0]], 0x05 = [[5.0.0]], 0x06 = [[6.0.0]], 0x07 = [[6.2.0]], 0x08 = [[7.0.0]], 0x09 = [[8.1.0]], 0x0A = [[9.0.0]], 0xFF = Invalid)
|-
|-
| 0x230
| 0x230
Line 84: Line 84:
When the above '''Old Key Generation''' field is 0x2 on >= v3.0, different {crypto/keydata} is used for the sections' data. With system content, this is used with every ncatype except ncatype0. The only other exception is {data-content} for the firm titles: this is required in order for older-system-versions to install it.
When the above '''Old Key Generation''' field is 0x2 on >= v3.0, different {crypto/keydata} is used for the sections' data. With system content, this is used with every ncatype except ncatype0. The only other exception is {data-content} for the firm titles: this is required in order for older-system-versions to install it.


'''Key Generation''' 0x3 (with '''Old Key Generation''' set to 0x2) is used for all [[3.0.1]] sysmodules and the [[System_Version_Title]].
'''Key Generation''' 0x3 (with '''Old Key Generation''' set to 0x2) is used for all [[3.0.1]] sysmodules and the [[System_Version_Title]]. With [[3.0.2]], all updated titles use the crypto from [[3.0.1]] for non-ncatype0, except for firm {data-content}. In some cases various game content uses the above newer crypto as well.


With [[3.0.2]], all updated titles use the crypto from [[3.0.1]] for non-ncatype0, except for firm {data-content}.
'''Key Generation''' is always '''Master Key Version''' + 1, except for generations 0 and 1 which are both version 0.
 
Note: in some cases various game content uses the above newer crypto as well.


The keyindex passed to <key-generation-related code> is determined as follows:
The keyindex passed to <key-generation-related code> is determined as follows: