Difference between revisions of "AMPXI:ValidateDSiWareSectionMAC"
Jump to navigation
Jump to search
Steveice10 (talk | contribs) m |
|||
(2 intermediate revisions by one other user not shown) | |||
Line 9: | Line 9: | ||
|- | |- | ||
| 1 | | 1 | ||
− | | Buf0 size | + | | Buf0 size (must be 0x10) |
|- | |- | ||
| 2 | | 2 | ||
− | | Buf1 size | + | | Buf1 size (must be 0x20) |
|- | |- | ||
| 3 | | 3 | ||
− | | u8 [[DSiWare_Exports|DSiWare]] section index | + | | u8, [[DSiWare_Exports|DSiWare]] section index |
|- | |- | ||
| 4 | | 4 | ||
− | | Buf0Size<<8 <nowiki>|</nowiki> 0x4 | + | | (Buf0Size << 8) <nowiki>|</nowiki> 0x4 |
|- | |- | ||
| 5 | | 5 | ||
− | | Buf0 | + | | Buf0 pointer |
|- | |- | ||
| 6 | | 6 | ||
− | | Buf1Size<<8 <nowiki>|</nowiki> 0x14 | + | | (Buf1Size << 8) <nowiki>|</nowiki> 0x14 |
|- | |- | ||
| 7 | | 7 | ||
− | | Buf1 | + | | Buf1 pointer |
|} | |} | ||
Line 37: | Line 37: | ||
|- | |- | ||
| 0 | | 0 | ||
− | | Header code | + | | Header code [0x00550040] |
|- | |- | ||
| 1 | | 1 | ||
Line 44: | Line 44: | ||
=Description= | =Description= | ||
− | This calculates an AES MAC over the 0x20-byte buf1 SHA-256 hash. When this MAC matches the MAC stored in buf0, result-code 0 is returned, otherwise an error is returned. This is used | + | This calculates an AES MAC over the 0x20-byte buf1 SHA-256 hash. When this MAC matches the MAC stored in buf0, result-code 0 is returned, otherwise an error is returned. This is used by [[AM:ImportDSiWare|AM]] module to verify the DSiWare section's [[DSiWare_Exports|metadata]] MAC after decrypting the payload data. |
Latest revision as of 02:09, 10 January 2016
Request[edit]
Index Word | Description |
---|---|
0 | Header code [0x005500C4] |
1 | Buf0 size (must be 0x10) |
2 | Buf1 size (must be 0x20) |
3 | u8, DSiWare section index |
4 | (Buf0Size << 8) | 0x4 |
5 | Buf0 pointer |
6 | (Buf1Size << 8) | 0x14 |
7 | Buf1 pointer |
Response[edit]
Index Word | Description |
---|---|
0 | Header code [0x00550040] |
1 | Result code |
Description[edit]
This calculates an AES MAC over the 0x20-byte buf1 SHA-256 hash. When this MAC matches the MAC stored in buf0, result-code 0 is returned, otherwise an error is returned. This is used by AM module to verify the DSiWare section's metadata MAC after decrypting the payload data.