Changes

Jump to navigation Jump to search

F00D Commands

434 bytes added, 16 January
SCE_SBL_SM_COMM_FID_SM_SNVS_ENC_SECTORS.
Calculates a XTS Encrypt using the per console keys in keyring slot 0x502, and 0x503 for the tweak and decryption keys. Appears to be intended for up to 0x3e0 in size, but the size in F00D packet +4 derives the xts XTS size and memcpy.
{| class="wikitable"
SCE_SBL_SM_COMM_FID_SM_SNVS_DEC_SECTORS.
Calculates a XTS Decrypt using the per console keys in keyring slot 0x502, and 0x503 for the tweak and decryption keys. Appears to be intended for up to 0x3e0 in size, but the size in F00D packet +4 derives the xts XTS size and memcpy.
?Input data size is 0x28?
SCE_SBL_SM_COMM_FID_SM_SNVS_ENC_MGMT.
 
The input are the new status and flags, and the current mgmt_data read from NVS at offset 0.
Calculates a XTS Decrypt using the per console keys in keyring slot 0x502, and 0x503 for the tweak and decryption keys. It then calculates an HMAC using the keyring 0x504 to check the block passed in. If ok, then it uses the seed 0xACA9B1AC to recalculate the block, generate a new hmac, and xts encrypt the block.
 
The result is a new mgmt_data, which is to be written to NVS at offset 0.
 
Input data size is 0x28 bytes.
 
<source lang="C">
typedef struct input {
int status; // input
char flags[4]; // input
char mgmt_data[0x20]; // input: read from NVS at offset 0. Likely to be 0x10 bytes of data followed by 0x10 bytes of HMAC.
} input;
</source>
=== 0x90002 sceSblUsSmSnvsDecryptMgmtData ===
SCE_SBL_SM_COMM_FID_SM_SNVS_DEC_MGMT.
The input is the current mgmt_data read from NVS at offset 0. Calculates a XTS Decrypt using the per console keys in keyring slot 0x502, and 0x503 for the tweak and decryption keys. It then calculates an HMAC using the keyring 0x504 to check the block passed in (mgmt_data). In theory, the first 0x10 bytes is the data and the last 0x10 bytes is the HMAC.  The result is a 8 byte buffer (the current status and flags) returned in the main F00D packet.
Input data size is 0x28 bytes.
int status; // output
char flags[4]; // output
char mgmt_data[0x20]; // input: read from NVS at offset 0. Likely to be 0x10 bytes of data followed by 0x10 bytes of HMAC.
} input;
</source>
</source>
If flagflags[SCE_SBL_SS_SNVS_UPDATER_FLAG_INDEX] is not set, updater init is skipped:
<source lang="C">
if (((byte)flags & 1) == 0)
4,927

edits

Navigation menu