AM:ImportTwlBackup: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
No edit summary |
||
| Line 62: | Line 62: | ||
AM module uses [[Application_Manager_Services_PXI|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. | AM module uses [[Application_Manager_Services_PXI|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 [[ | 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. | ||
Revision as of 18:13, 25 April 2013
Request
| Index Word | Description |
|---|---|
| 0 | Header code [0x001C0084] |
| 1 | BufSize, must be >=0x20000. |
| 2 | u8 Operation |
| 3 | Value 0x10 |
| 4 | Handle |
| 5 | (BufSize<<8) | 12 |
| 6 | Buffer ptr, this input buffer contains the encrypted DSiWare export banner, header, and footer. |
Response
| Index Word | Description |
|---|---|
| 0 | Header code |
| 1 | Result code |
Operation Values
| 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.