PSPXI:EncryptDecryptAes: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| Line 15: | Line 15: | ||
|- | |- | ||
| 6 | | 6 | ||
| Algorithm Type (0..5) | | u8 Algorithm Type (0..5) | ||
|- | |- | ||
| 7 | | 7 | ||
| Key Type (0..7) | | u8 Key Type (0..7) | ||
|- | |- | ||
| 8 | | 8 | ||
Revision as of 22:14, 30 May 2013
Request
| Index Word | Description |
|---|---|
| 0 | Header code [0x000401C4] |
| 1 | Size in bytes |
| 2-5 | IV / CTR |
| 6 | u8 Algorithm Type (0..5) |
| 7 | u8 Key Type (0..7) |
| 8 | (size<<8) | 0x4 |
| 9 | Source pointer |
| 10 | (size<<8) | 0x14 |
| 11 | Destination pointer |
Response
| Index Word | Description |
|---|---|
| 0 | Header code [0x00040140] |
| 1 | Result code |
| 2-5 | MAC |
MAC
For CBC mode, the output MAC is the last 16-bytes of the ciphertext. For the other modes, this field is the same as the input IV/CTR.
Algorithm Types
| Type | Description |
|---|---|
| 0 | CBC Encrypt |
| 1 | CBC Decrypt |
| 2 | CTR Encrypt |
| 3 | CTR Decrypt |
| 4 | CCM Encrypt |
| 5 | CCM Decrypt |
Key Types
| Type | AES Engine Keyslot | Description |
|---|---|---|
| 0 | 0x0D | Used to decrypt the SSL client cert/private-key stored in ClCertA. |
| 1 | 0x2D | Used to generate the UDS local-WLAN CCMP key. |
| 2 | 0x31 | This is used by NS for the APT AES-CCM Wrap/Unwrap commands. These two NS commands are used by the Mii Maker application for the encrypted Mii data in the Mii QR codes. |
| 3 | 0x38 | BOSS |
| 4 | 0x32 | ? |
| 5 | 0x39 | This is used by the Download Play module. |
| 6 | 0x2E | ? |