SceSblPostSsMgr

sceSblPostSsMgrInitializeSpfsoCtxForDriver
derived from _vshSblAuthMgrVerifySpsfo

sceSblPostSsMgrVerifySpfsoCtxForDriver
derived from _vshSblAuthMgrVerifySpsfo

sceSblPostSsMgrReleaseSpfsoCtxForDriver
derived from _vshSblAuthMgrVerifySpsfo

sceSblLicMgrGetExpireDateForDriver
Get activation data expire date

sceSblPmMgrGetProductModeForDriver
executes pm_sm.self commands 2, 3, 4, 5, 6, 7, 8, 9, 0xA

sceSblPmMgrGetProductMode2ForDriver
Executes pm_sm.self commands 2, 3, 4, 5, 6, 7, 8, 9, 0xA.

sceSblPmMgrGetProductModeFromNVSForDriver
Executes pm_sm.self command 8.

sceSblPmMgrAuthEtoIForDriver
Executes pm_sm_sd.self commands 9, A.

sceSblPostSsMgrDecryptSealedkeyForDriver
is 0x50 bytes of data from sealedkey

this function:

verifies pfsSKKey header

decrypts aes_key(pfsSKKey__EncKey) and hmac_key(pfsSKKey__Secret) using sceSblSsMgrEncryptWithPortabilityForDriver

verifies hmac256 value in

decrypts  into

sceSblPostSsMgrEncryptSealedkeyForDriver
is 0x50 bytes of data like in sealedkey

this function:

writes pfsSKKey header

decrypts aes_key(pfsSKKey__EncKey) and hmac_key(pfsSKKey__Secret) using sceSblSsMgrEncryptWithPortabilityForDriver

randomly generates 0x10 bytes of IV with sceSblSsMgrGetRandomNumberForDriver

randomly generates 0x10 bytes of secret with sceSblSsMgrGetRandomNumberForDriver

encrypts the secret into

calculates hmac256 value into

sceSblPostSsMgrVerifyKeystoneForDriver
This function verifies magic in the header and HMAC of the keystone file

sceSblPostSsMgrVerifyKeystoneWithPasscodeForDriver
This function calls sceSblPostSsMgrVerifyKeystoneForDriver. Then also verifies HMAC of passcode.

sceSblUtMgrUpdateUtokenForDriver
Executes utoken_sm command 1 (?to encrypt or verify buffer?) Writes a 0x800 buffer to tm0:utoken/utoken.dat.

Called by SceSblUtMgr_BDE74645.

sceSblUtMgrResetUtokenFileForDriver
Writes 0x800 blank tm0:utoken/utoken.dat or removes it.

Exported to userland by sceSblUtMgrResetUtokenFile.

sceSblUtMgrHasComTestFlagForDriver
Derived from vshSblUtMgrHasComTestFlag.

sceSblUtMgrHasStoreFlagForDriver
Derived from vshSblUtMgrHasStoreFlag.

sceSblUtMgrHasNpTestFlagForDriver
Derived from vshSblUtMgrHasNpTestFlag.

sceSblRtcMgrSetCpRtcForDriver
Set RTC in DevKit CP.

sceSblPmMgrGetProductModeForUser
Returns 0 on success.

Gets sysroot_buffer using sceKernelGetSysrootBufferForDriver.

result = ((int *)(sysroot_buffer->boot_type_indicator_1) >> 2) & 1; // manufacturing mode flag

sceSblPmMgrGetProductModeFromNVS
Calls sceSblPmMgrGetProductModeFromNVSForDriver.

sceSblPmMgrGetCurrentMode
Returns 0 on success.

Gets sysroot_buffer using sceKernelGetSysrootBufferForDriver.

result = ((int *)(sysroot_buffer->boot_type_indicator_1) >> 2) & 1; // manufacturing mode flag

sceSblRtcMgrGetCpSerialId
Calls sceDeci4pCpupGetCpSerialIdForDriver.

SceSblLicMgr
Functions related to afv file.

sceSblLicMgrGetUsageTimeLimit
Uses sceSblSsMgrGetQAFlagsForKernel.

sceSblUtMgrUpdateUtoken
Calls sceSblUtMgrUpdateUtokenForDriver(buf, 0x800);.

sceSblUtMgrResetUtokenFile
Calls sceSblUtMgrResetUtokenFileForDriver.

sceSblUtMgrGetCurrentSecureTick
Calls sceRtcGetCurrentSecureTickForDriver then uses sceKernelMemcpyKernelToUserForDriver.

sceSblUtMgrIsTrilithiumFlagEnabled
buf takes value "UT_TRILITHIUM_FLAG" if a flag is enabled.