Changes

308 bytes added ,  03:02, 1 February 2022
Found information from reversing all PS versions and some P9 binaries and given named based on what used for
Line 2: Line 2:  
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
!  Command Header
+
!  Command Header (Pre 2.0)
 +
!  Command Header (Post 2.0)
 
!  Available since system version
 
!  Available since system version
 
!  Description
 
!  Description
 
|-
 
|-
 +
| 0x000100C6
 
| 0x000100C6
 
| 0x000100C6
 
| [[1.0.0-0]]
 
| [[1.0.0-0]]
 
| This crypts a raw message with RSA.
 
| This crypts a raw message with RSA.
 
|-
 
|-
 +
| 0x00020284
 
| 0x00020284
 
| 0x00020284
 
| [[1.0.0-0]]
 
| [[1.0.0-0]]
 
| SignRsaSha256
 
| SignRsaSha256
 
|-
 
|-
 +
| 0x00030284
 
| 0x00030284
 
| 0x00030284
 
| [[1.0.0-0]]
 
| [[1.0.0-0]]
 
| VerifyRsaSha256
 
| VerifyRsaSha256
 
|-
 
|-
 +
| 0x00040140
 +
| Removed
 +
| [[1.0.0-0]], removed with [[2.0.0-2]]
 +
| SetAesKey
 +
|-
 +
| 0x000501C4
 
| 0x000401C4
 
| 0x000401C4
 
| [[1.0.0-0]]
 
| [[1.0.0-0]]
 
| [[PSPXI:EncryptDecryptAes|EncryptDecryptAes]]
 
| [[PSPXI:EncryptDecryptAes|EncryptDecryptAes]]
 
|-
 
|-
 +
| 0x00060284
 
| 0x00050284
 
| 0x00050284
 
| [[1.0.0-0]]
 
| [[1.0.0-0]]
 
| [[PSPXI:EncryptSignDecryptVerifyAesCcm|EncryptSignDecryptVerifyAesCcm]]
 
| [[PSPXI:EncryptSignDecryptVerifyAesCcm|EncryptSignDecryptVerifyAesCcm]]
 
|-
 
|-
 +
| 0x00070000
 
| 0x00060000
 
| 0x00060000
 
| [[1.0.0-0]]
 
| [[1.0.0-0]]
 
| GetRomId. This reads 0x40-bytes from [[Gamecards|gamecard]] command 0xC6 (gamecard-uniqueID), and returns the first 0x10-bytes from that since the rest of the command reply is all 0xFF-bytes.
 
| GetRomId. This reads 0x40-bytes from [[Gamecards|gamecard]] command 0xC6 (gamecard-uniqueID), and returns the first 0x10-bytes from that since the rest of the command reply is all 0xFF-bytes.
 
|-
 
|-
 +
| 0x00080000
 
| 0x00070000
 
| 0x00070000
 
| [[1.0.0-0]]
 
| [[1.0.0-0]]
 
| GetRomId2. The first u8 this returns is from GetRomMakerCode, the following 0x10-bytes are from [[AES|encrypting]] the 0x10-bytes which GetRomId also returns. This is encrypted with AES-CBC, the regular normal-key and IV set by [[FIRM|Process9]] for this are loaded from the Process9 .rodata section.
 
| GetRomId2. The first u8 this returns is from GetRomMakerCode, the following 0x10-bytes are from [[AES|encrypting]] the 0x10-bytes which GetRomId also returns. This is encrypted with AES-CBC, the regular normal-key and IV set by [[FIRM|Process9]] for this are loaded from the Process9 .rodata section.
 
|-
 
|-
 +
| 0x00090000
 
| 0x00080000
 
| 0x00080000
 
| [[1.0.0-0]]
 
| [[1.0.0-0]]
 
| [[PSPXI:GetCTRCardAutoStartupBit|GetCTRCardAutoStartupBit]]
 
| [[PSPXI:GetCTRCardAutoStartupBit|GetCTRCardAutoStartupBit]]
 
|-
 
|-
 +
| 0x000A0000
 
| 0x00090000
 
| 0x00090000
 
| [[1.0.0-0]]
 
| [[1.0.0-0]]
 
| GetRomMakerCode
 
| GetRomMakerCode
 
|-
 
|-
 +
| 0x000B0000
 
| 0x000A0000
 
| 0x000A0000
 
| [[1.0.0-0]]
 
| [[1.0.0-0]]
 
| [[PSPXI:GetLocalFriendCodeSeed|GetLocalFriendCodeSeed]]
 
| [[PSPXI:GetLocalFriendCodeSeed|GetLocalFriendCodeSeed]]
 
|-
 
|-
 +
| 0x000C0000
 
| 0x000B0000
 
| 0x000B0000
 
| [[1.0.0-0]]
 
| [[1.0.0-0]]
 
| [[PSPXI:GetDeviceId|GetDeviceId]]
 
| [[PSPXI:GetDeviceId|GetDeviceId]]
 
|-
 
|-
 +
| 0x000D0042
 
| 0x000C0042
 
| 0x000C0042
 
| [[1.0.0-0]]
 
| [[1.0.0-0]]
 
| SeedRNG
 
| SeedRNG
 
|-
 
|-
 +
| 0x000E0042
 
| 0x000D0042
 
| 0x000D0042
 
| [[1.0.0-0]]
 
| [[1.0.0-0]]
 
| [[PSPXI:GenerateRandomBytes|GenerateRandomBytes]]
 
| [[PSPXI:GenerateRandomBytes|GenerateRandomBytes]]
 
|-
 
|-
| 0x000E0042
+
| 0x04010084
| [[1.0.0-0]], removed with [[2.0.0-2]]
  −
| With [[2.0.0-2]] the system no longer handles this command at all. This was mostly the same as GenerateRandomBytes.
  −
|-
   
| 0x04010084
 
| 0x04010084
 
| [[8.1.0-0_New3DS]]
 
| [[8.1.0-0_New3DS]]
| [[New_3DS]]-only. cmd[1] = insize, cmd[2] = outsize, cmd[3] = (insize<<8) <nowiki>|</nowiki> 0x4, cmd[4] = inbufptr, cmd[5] = (outsize<<8) <nowiki>|</nowiki> 0x14, and cmd[6] = outbufptr.
+
| GenerateAmiiboHMAC. [[New_3DS]]-only. cmd[1] = insize, cmd[2] = outsize, cmd[3] = (insize<<8) <nowiki>|</nowiki> 0x4, cmd[4] = inbufptr, cmd[5] = (outsize<<8) <nowiki>|</nowiki> 0x14, and cmd[6] = outbufptr.
 
|-
 
|-
 +
| 0x04020082
 
| 0x04020082
 
| 0x04020082
 
| [[8.1.0-0_New3DS]]
 
| [[8.1.0-0_New3DS]]
| [[New_3DS]]-only. cmd[1] = insize, cmd[2] = u8 flag, cmd[3] = (insize<<8) <nowiki>|</nowiki> 0x4, cmd[4] = inbufptr.
+
| GenerateAmiiboKeyData. [[New_3DS]]-only. cmd[1] = insize, cmd[2] = u8 flag, cmd[3] = (insize<<8) <nowiki>|</nowiki> 0x4, cmd[4] = inbufptr.
 
|-
 
|-
 +
| 0x04030044
 
| 0x04030044
 
| 0x04030044
 
| [[8.1.0-0_New3DS]]
 
| [[8.1.0-0_New3DS]]
| [[New_3DS]]-only.
+
| AmiiboEncryptDecrypt. [[New_3DS]]-only.
 
|-
 
|-
 +
| 0x04040044
 
| 0x04040044
 
| 0x04040044
 
| [[8.1.0-0_New3DS]]
 
| [[8.1.0-0_New3DS]]
| [[New_3DS]]-only.
+
| AmiiboEncryptDecryptDev. [[New_3DS]]-only.
 
|}
 
|}
   Line 145: Line 164:  
|-
 
|-
 
| 0x204
 
| 0x204
| 0x4
+
| 0x1
| Normally zero?
+
| 0 = Public Exponent, 1 = Private Exponent
 +
|-
 +
| 0x205
 +
| 0x3
 +
| Padding
 
|}
 
|}
    
This context structure is fixed to 0x208-bytes.
 
This context structure is fixed to 0x208-bytes.
26

edits