Difference between revisions of "AM:ImportTwlBackup"
Jump to navigation
Jump to search
Steveice10 (talk | contribs) m (Steveice10 moved page AM:ImportDSiWare to AM:ImportTwlBackup) |
Steveice10 (talk | contribs) m |
||
Line 9: | Line 9: | ||
|- | |- | ||
| 1 | | 1 | ||
− | | | + | | Buffer Size (must be >= 0x20000) |
|- | |- | ||
| 2 | | 2 | ||
− | | u8 Operation | + | | u8, Operation |
|- | |- | ||
| 3 | | 3 | ||
− | | | + | | 0x10 |
|- | |- | ||
| 4 | | 4 | ||
Line 21: | Line 21: | ||
|- | |- | ||
| 5 | | 5 | ||
− | | | + | | (Buffer Size << 4) <nowiki>|</nowiki> 0xC |
|- | |- | ||
| 6 | | 6 | ||
− | | Buffer | + | | Buffer Pointer (encrypted [[DSiWare_Exports|DSiWare]] export banner, header, and footer) |
|} | |} | ||
Line 40: | Line 40: | ||
|} | |} | ||
− | =Operation | + | =Operation= |
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- |
Revision as of 09:14, 17 April 2016
Request
Index Word | Description |
---|---|
0 | Header code [0x001C0084] |
1 | Buffer Size (must be >= 0x20000) |
2 | u8, Operation |
3 | 0x10 |
4 | Handle |
5 | (Buffer Size << 4) | 0xC |
6 | Buffer Pointer (encrypted DSiWare export banner, header, and footer) |
Response
Index Word | Description |
---|---|
0 | Header code |
1 | Result code |
Operation
Value | Description |
---|---|
0-1 | Invalid, same as values 4 and 7. |
2 and 5 | ? |
3 and 6 | ? |
4 and >=7 | No importing is done here. |
Description
AM module uses AMPXI:DecryptDSiWareData for decrypting each DSiWare section. After decrypting a section via that command, AM module calculates a hash over the decrypted payload data for AMPXI:ValidateDSiWareSectionMAC. The footer hash for this section is then verified by calculating a hash over the cleartext data as well.
After AM module validates the header, AM module then uses AMPXI:ValidateDSiWareMovableSedHash. The footer ECDSA verification is handled by AMPXI:VerifyDSiWareFooter. The decrypted banner is written to inputbuffer+0.