vitasdk
Documentation of the vitasdk
post_ss_mgr.h File Reference

Go to the source code of this file.

Data Structures

struct  SceSblSealedKey
 
struct  SceSblKeystone
 
struct  SceSblDebugKeystone
 
struct  SceSblCloudDataKeyRing
 
struct  SceSblCloudDataRsaValue
 
struct  SceSblCloudDataSignCryptHandle
 
struct  SceSblRsaDataParam
 
struct  SceSblRsaPublicKeyParam
 
struct  SceSblRsaPrivateKeyParam
 

Macros

#define ksceSblPostSsMgrActivate   ksceSblLicMgrActivateDevkit
 
#define ksceSblPostSsMgrGetExpireDate   ksceSblLicMgrGetExpireDate
 
#define _ksceSblPostSsMgrExecutePmSmF00dCommand   ksceSblPmMgrSetSdModeOff
 
#define ksceSblPostSsMgrExecutePmSmF00dCommand   ksceSblPmMgrSetProductMode
 
#define ksceSblPostSsMgrExecutePmSmF00dCommand8   ksceSblPmMgrGetProductModeFromNVS
 
#define ksceSblPostSsMgrExecutePmSmSdF00dCommand   ksceSblPmMgrAuthEtoI
 
#define ksceSblPostSsMgrSetCpRtc   ksceSblRtcMgrSetCpRtcPhysical
 
#define ksceSblPostSsMgrInitializeSpfsoCtx   ksceSblSpsfoMgrOpen
 
#define ksceSblPostSsMgrReleaseSpfsoCtx   ksceSblSpsfoMgrClose
 
#define ksceSblPostSsMgrVerifySpfsoCtx   ksceSblSpsfoMgrVerify
 
#define ksceSblUtMgrExecuteUtokenSmCommand1   ksceSblUtMgrVerifyAndStoreUtoken
 
#define ksceSblUtMgrGetTrilithiumBuffer   ksceSblUtMgrGetSelfAuthInfo
 
#define ksceSblUtMgrHasPSMTestFlag   ksceSblUtMgrHasFlag1
 
#define ksceSblUtMgrHasSystemDataFilePlayReadyFlag   ksceSblUtMgrHasFlag8
 

Enumerations

enum  SceSblRsaHashType {
  SCE_SBL_RSA_HASH_TYPE_MD2 = 0x2 , SCE_SBL_RSA_HASH_TYPE_MD5 = 0x4 , SCE_SBL_RSA_HASH_TYPE_SHA1 = 0x5 , SCE_SBL_RSA_HASH_TYPE_SHA256 = 0xB ,
  SCE_SBL_RSA_HASH_TYPE_SHA384 = 0xC , SCE_SBL_RSA_HASH_TYPE_SHA512 = 0xD , SCE_SBL_RSA_HASH_TYPE_SHA224 = 0xE
}
 Hash algorithms accepted by the RSA PKCS #1 v1.5 helpers. More...
 

Functions

 VITASDK_BUILD_ASSERT_EQ (0x50, SceSblSealedKey)
 
 VITASDK_BUILD_ASSERT_EQ (0x60, SceSblKeystone)
 
 VITASDK_BUILD_ASSERT_EQ (0x40, SceSblDebugKeystone)
 
 VITASDK_BUILD_ASSERT_EQ (0x2A0, SceSblCloudDataKeyRing)
 
 VITASDK_BUILD_ASSERT_EQ (0x104, SceSblCloudDataRsaValue)
 
 VITASDK_BUILD_ASSERT_EQ (0x208, SceSblCloudDataSignCryptHandle)
 
 VITASDK_BUILD_ASSERT_EQ (8, SceSblRsaDataParam)
 
 VITASDK_BUILD_ASSERT_EQ (8, SceSblRsaPublicKeyParam)
 
 VITASDK_BUILD_ASSERT_EQ (0x24, SceSblRsaPrivateKeyParam)
 
int ksceSblRSA2048CreateSignature (SceSblRsaDataParam *rsa_signature, SceSblRsaDataParam *hash, SceSblRsaPrivateKeyParam *private_key, int type)
 Create an RSA-2048 signature.
 
int ksceSblRSA2048VerifySignature (SceSblRsaDataParam *rsa_signature, SceSblRsaDataParam *hash, SceSblRsaPublicKeyParam *public_key, int type)
 Verify an RSA-2048 signature.
 
int ksceSblCoredumpKeyStoreInitialize (void)
 Initialize the coredump key store.
 
int ksceSblCoredumpKeyStoreFinalize (void)
 Securely clear and finalize the coredump key store.
 
int ksceSblCoredumpGetHmacKey (SceUInt32 key_id, SceSize key_size, void *key)
 Get a coredump HMAC-SHA-256 key.
 
int ksceSblCoredumpGetAesKey (SceUInt32 key_id, SceSize key_size, void *key)
 Get a coredump AES-128 key.
 
int ksceSblPostSsMgrEncryptSealedkey (SceSblSealedKey *sealed_key)
 Create a sealed-key blob containing a newly generated secret.
 
int ksceSblPostSsMgrDecryptSealedkey (const SceSblSealedKey *sealed_key, SceUInt8 *secret)
 Authenticate a sealed-key blob and decrypt its secret.
 
int ksceSblPostSsMgrDebugEncryptKeystone (const SceUInt8 *secret, SceSblDebugKeystone *keystone)
 Encrypt a secret into a debug keystone.
 
int ksceSblPostSsMgrDebugDecryptKeystone (const SceSblDebugKeystone *keystone, SceUInt8 *secret)
 Validate the header and decrypt a debug keystone.
 
int ksceSblPostSsMgrVerifyKeystone (const SceSblKeystone *keystone, int version)
 Verify a keystone without a passcode.
 
int ksceSblPostSsMgrVerifyKeystoneWithPasscode (const SceSblKeystone *keystone, const SceUInt8 *passcode)
 Verify a keystone using a passcode.
 
int ksceSblPostSsMgrGenerateAppKey (const SceSblAppKey *input, SceSblAppKey *output)
 Transform an application key using the portability key.
 
int ksceSblSsMgrCloudDataGetEncDecCryptHandle (SceSblCloudDataKeyRing *key_ring)
 Get the cloud-data encryption and decryption key ring.
 
int ksceSblSsMgrCloudDataGetSignCryptHandle (SceUInt32 mode, SceUInt32 index, SceSblCloudDataSignCryptHandle *handle)
 Get one cloud-data RSA signing handle.
 
int ksceSblSsMgrCloudDataStop (void)
 Securely clear the cloud-data encryption and signing key rings.
 
int ksceSblFwLoaderLoad (int e_phnum, void *destination, SceSize max_size, SceSize *loaded_size)
 Load an authenticated firmware image.
 
int ksceSblFwLoaderLock (const char *path, int reserved)
 Lock and authenticate a firmware image.
 
int ksceSblFwLoaderUnlock (void)
 Release the firmware-loader lock and discard the saved path.
 
int ksceSblLicMgrGetActivationKey (SceSblActivationKey *key)
 Get the activation key.
 
int ksceSblLicMgrGetLicenseStatus (void)
 Get the cached license state.
 
int ksceSblLicMgrActivateDevkit (const char *afv_path)
 Activate a development kit from an activation file.
 
int ksceSblLicMgrGetExpireDate (int *expire_date, SceBool read_from_nvs)
 Get the cached activation expiration time or refresh it from NVS.
 
int ksceSblPmMgrSetSdModeOff (SceUInt32 reserved)
 Disable SD mode through the PM secure module.
 
int ksceSblPmMgrSetProductMode (SceBool enable)
 Enter or leave manufacturing mode through the PM secure module.
 
int ksceSblPmMgrGetProductModeFromNVS (SceUInt8 *product_mode)
 Read the raw product-mode byte from NVS through the PM secure module.
 
int ksceSblPmMgrAuthEtoI (void)
 Perform the EtoI jig-authentication exchange through pm_sm_sd.self.
 
int ksceSblRtcMgrSetCpRtcPhysical (int rtc)
 Set the 32-bit CP physical RTC value.
 
int ksceSblRtcMgrSetCpRtcLogical (int rtc)
 Set the CP logical RTC.
 
int ksceSblRtcMgrGetCpRtcLogical (int *rtc)
 Get the 32-bit CP logical RTC value.
 
int ksceSblRtcMgrGetCpRtcPhysical (int *rtc)
 Get the 32-bit CP physical RTC value.
 
int ksceSblSpsfoMgrOpen (const char *path, SceSblSpsfoContext *context)
 Open an SPSFO file in a mapped memory block.
 
int ksceSblSpsfoMgrClose (SceSblSpsfoContext *context)
 Close an SPSFO context and release its mapped memory block.
 
int ksceSblSpsfoMgrVerify (SceSblSpsfoContext *context, void **payload, SceSize *payload_size)
 Verify an opened SPSFO file.
 
int ksceSblUtMgrVerifyAndStoreUtoken (const SceUtoken *utoken, SceSize size)
 Verify an encrypted Utoken and write it to storage.
 
int ksceSblUtMgrGetSelfAuthInfo (SceUtokenSelfAuthInfo *self_auth_info)
 Get the Utoken type-11 self-authorization override.
 
int ksceSblUtMgrHasComTestFlag (void)
 Check whether the initialized Utoken contains a COM-test PAID.
 
int ksceSblUtMgrHasNpTestFlag (void)
 Check whether NP-test policy is enabled.
 
int ksceSblUtMgrHasStoreFlag (void)
 Check whether Utoken flag bit 4 enables Store-mode policy.
 
int ksceSblUtMgrHasFlag1 (void)
 Get Utoken flag bit 1.
 
int ksceSblUtMgrHasFlag6 (void)
 Get Utoken flag bit 6.
 
int ksceSblUtMgrHasFlag7 (void)
 Get Utoken flag bit 7.
 
int ksceSblUtMgrHasFlag8 (void)
 Get Utoken flag bit 8.
 
int ksceSblUtMgrHasFlag9 (void)
 Get Utoken flag bit 9.
 
SceBool ksceSblUtMgrIsAllowComTest (SceUID pid)
 Check whether a process is allowed to use COM test mode.
 
SceBool ksceSblUtMgrIsAllowProgramDebug (SceUInt64 program_authority_id)
 Check whether a program authority ID is in the Utoken debug whitelist.
 
int ksceSblUtMgrResetUtokenFile (void)
 Overwrite and remove the stored Utoken file.