AM:ImportTwlBackup: Difference between revisions

No edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 9: Line 9:
|-
|-
| 1
| 1
| BufSize, must be >=0x20000.
| Buffer Size (must be >= 0x20000)
|-
|-
| 2
| 2
| u8 Operation
| u8, Operation
|-
|-
| 3
| 3
| Value 0x10
| 0x10
|-
|-
| 4
| 4
| Handle
| [[Filesystem_services|FSFILE]] Handle
|-
|-
| 5
| 5
| <nowiki>(BufSize<<8) | 12</nowiki>
| (Buffer Size << 4) <nowiki>|</nowiki> 0xC
|-
|-
| 6
| 6
| Buffer ptr, this input buffer contains the encrypted [[DSiWare_Exports|DSiWare]] export banner, header, and footer.
| Work buffer pointer
|}
|}


Line 40: Line 40:
|}
|}


=Operation Values=
=Operation=
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
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 [[AMPXI:VerifyDSiWareFooter]]. The decrypted banner is written to inputbuffer+0.
After AM module validates the header, AM module then uses [[AMPXI:ValidateDSiWareMovableSedHash]]. The footer ECDSA verification is handled by [[AMPXI:VerifyDSiWareFooter]].