Difference between revisions of "AMPXI:ValidateDSiWareMovableSedHash"

From 3dbrew
Jump to navigation Jump to search
m
 
(2 intermediate revisions by one other user not shown)
Line 9: Line 9:
 
|-
 
|-
 
| 1
 
| 1
| Buf0 size, must be 0x10-bytes.
+
| Buf0 size (must be 0x10)
 
|-
 
|-
 
| 2
 
| 2
| Buf1 size, must be 0x20-bytes.
+
| Buf1 size (must be 0x20)
 
|-
 
|-
 
| 3
 
| 3
| Buf0Size<<8 <nowiki>|</nowiki> 0x4
+
| (Buf0Size << 8) <nowiki>|</nowiki> 0x4
 
|-
 
|-
 
| 4
 
| 4
| Buf0 ptr
+
| Buf0 pointer
 
|-
 
|-
 
| 5
 
| 5
| Buf1Size<<8 <nowiki>|</nowiki> 0x14
+
| (Buf1Size << 8) <nowiki>|</nowiki> 0x14
 
|-
 
|-
 
| 6
 
| 6
| Buf1 ptr
+
| Buf1 pointer
 
|}
 
|}
  
Line 34: Line 34:
 
|-
 
|-
 
| 0
 
| 0
| Header code
+
| Header code [0x00530040]
 
|-
 
|-
 
| 1
 
| 1
Line 43: Line 43:
 
This calculates a SHA-256 hash over the 0x130-byte data from [[FSPXI:ExportIntegrityVerificationSeed]]. When the calculated hash matches the hash stored in buf1, result-code 0xC8A0802E is returned, otherwise result-code 0xC8A0802F is returned.
 
This calculates a SHA-256 hash over the 0x130-byte data from [[FSPXI:ExportIntegrityVerificationSeed]]. When the calculated hash matches the hash stored in buf1, result-code 0xC8A0802E is returned, otherwise result-code 0xC8A0802F is returned.
  
The 0x10-byte buf0 data is copied to internal memory, however this data is not used after it's copied.
+
The 0x10-byte buf0 data is copied to internal memory, however this data is not used after it's copied. This command is used by [[Application_Manager_Services_PXI|AM]] module to verify the hash stored in the [[DSiWare_Exports|DSiWare]] export header, when AM uses this command buf0 contains the encrypted AES block from the header.

Latest revision as of 03:08, 10 January 2016

Request[edit]

Index Word Description
0 Header code [0x00530084]
1 Buf0 size (must be 0x10)
2 Buf1 size (must be 0x20)
3 (Buf0Size << 8) | 0x4
4 Buf0 pointer
5 (Buf1Size << 8) | 0x14
6 Buf1 pointer

Response[edit]

Index Word Description
0 Header code [0x00530040]
1 Result code

Description[edit]

This calculates a SHA-256 hash over the 0x130-byte data from FSPXI:ExportIntegrityVerificationSeed. When the calculated hash matches the hash stored in buf1, result-code 0xC8A0802E is returned, otherwise result-code 0xC8A0802F is returned.

The 0x10-byte buf0 data is copied to internal memory, however this data is not used after it's copied. This command is used by AM module to verify the hash stored in the DSiWare export header, when AM uses this command buf0 contains the encrypted AES block from the header.