DSiWare Exports: Difference between revisions

No edit summary
Jason0597 (talk | contribs)
No edit summary
 
(7 intermediate revisions by one other user not shown)
Line 14: Line 14:
| 0-6
| 0-6
|  
|  
| Invalid
| Same as value 14.
|-
|-
| 7-11
| 7-11
Line 33: Line 33:
|}
|}


For NATIVE_FIRM versions where this DSiWare export [[AMPXI:ExportDSiWare|type]] field is unused, format version v1 is used with 4 content sections. Otherwise when this field is used, see the above table.
For NATIVE_FIRM versions where this DSiWare export [[AM:ExportDSiWare|type]] field is unused, format version v1 is used with 4 content sections. Otherwise when this field is used, see the above table. [[System Settings]] uses type 1 for [[AM:ExportDSiWare|exporting]] DSiWare, regardless of the System Settings title-version.


=Block Metadata=
=Block Metadata=
Line 48: Line 48:
| 0x10
| 0x10
| 0x10
| 0x10
| IV, generated by the RNG.
| IV, generated by the [[PSPXI:GenerateRandomBytes|RNG]].
|}
|}


Line 66: Line 66:
| 0x0 + X
| 0x0 + X
| 0x3C
| 0x3C
| ECDSA signature over the previous data, signed by the AP cert?
| ECDSA signature using SHA-256 over the previous hashes, signed by the APCert.
|-
|-
| 0x3C + X
| 0x3C + X
| 0x180
| 0x180
| ECDSA "APXXXXXXXXXXXXXXXX" cert signed by the [[CTCert]], where X is random lowercase ASCII hex data.
| ECDSA "APXXXXXXXXXXXXXXXX" cert signed by the below [[CTCert]], where X is [[PSPXI:GenerateRandomBytes|random]] lowercase ASCII hex data.
|-
|-
| 0x1BC + X
| 0x1BC + X
Line 82: Line 82:


These hashes are the same hashes used for generating each section's MAC stored in the metadata block. X = 0x40 + totalcontentsections*0x20.
These hashes are the same hashes used for generating each section's MAC stored in the metadata block. X = 0x40 + totalcontentsections*0x20.
The curve sect233r1 is used for all related ECDSA signing operations


=File Structure v1=
=File Structure v1=