![]() |
vitasdk
Documentation of the vitasdk
|
Exports for Kernel. More...
Data Structures | |
| struct | SceVisibleId |
| Opaque 32-byte visible identifier returned by aimgr_sm command 8. More... | |
| struct | SceOpenPsId |
| Console-specific 16-byte OpenPSID. More... | |
| struct | SceConsoleId |
| Sixteen-byte console identifier returned by aimgr_sm command 1. More... | |
| struct | ScePsCode |
| Eight-byte platform security code returned in host byte order. More... | |
| struct | ScePortabilityData |
| Fixed-capacity message used by the portability encryption services. More... | |
| struct | SceSblSsCreatePassPhraseParam |
| Parameters used to create the 0x200-byte CMA account pass phrase. More... | |
| struct | SceSblDmac5AesCmacContext |
| 16-byte chaining value used by the AES-CMAC DMAC5 commands. More... | |
| struct | SceSblDmac5HashTransformContext |
| Chaining context used by SHA-1, SHA-224, and SHA-256 DMAC5 commands. More... | |
| union | SceConsoleId.__unnamed19__ |
| struct | SceConsoleId.__unnamed19__.__unnamed21__ |
Macros | |
| #define | ksceSblSsMgrAesCtrDecrypt ksceSblDmac5AesCtrDec |
Enumerations | |
| enum | SceSblSsNvsDataType { SCE_SBL_SS_NVS_DATA_SYSTEM_LANGUAGE = 0 , SCE_SBL_SS_NVS_DATA_WLAN_BT_AVAILABILITY = 1 , SCE_SBL_SS_NVS_DATA_UNK_482 = 2 , SCE_SBL_SS_NVS_DATA_UNK_4E0 = 3 , SCE_SBL_SS_NVS_DATA_UNK_483 = 4 , SCE_SBL_SS_NVS_DATA_UNK_486 = 5 } |
| NVS values supported by ksceSblSsGetNvsData and ksceSblSsSetNvsData. More... | |
| enum | SceSblDmac5HashFlag { SCE_SBL_DMAC5_HASH_FLAG_OUTPUT_CONTEXT = 0x00000400 , SCE_SBL_DMAC5_HASH_FLAG_INPUT_CONTEXT = 0x00000800 } |
| Flags for supplying or returning a context in DMAC5 hash operations. More... | |
| enum | SceSblDmac5Keyslot { SCE_SBL_DMAC5_KEYSLOT_1C = 0x1C , SCE_SBL_DMAC5_KEYSLOT_1D = 0x1D , SCE_SBL_DMAC5_KEYSLOT_1E = 0x1E , SCE_SBL_DMAC5_KEYSLOT_1F = 0x1F } |
DMAC5 key slots accepted by the operations whose names end in WithKeyslot. More... | |
Functions | |
| VITASDK_BUILD_ASSERT_EQ (0x20, SceVisibleId) | |
| VITASDK_BUILD_ASSERT_EQ (0x10, SceOpenPsId) | |
| VITASDK_BUILD_ASSERT_EQ (0x10, SceConsoleId) | |
| VITASDK_BUILD_ASSERT_EQ (8, ScePsCode) | |
| VITASDK_BUILD_ASSERT_EQ (0x24, ScePortabilityData) | |
| VITASDK_BUILD_ASSERT_EQ (0x18, SceSblSsCreatePassPhraseParam) | |
| VITASDK_BUILD_ASSERT_EQ (0x10, SceSblDmac5AesCmacContext) | |
| VITASDK_BUILD_ASSERT_EQ (0x28, SceSblDmac5HashTransformContext) | |
| int | ksceSblAimgrGetConsoleId (SceConsoleId *cid) |
| int | ksceSblAimgrGetOpenPsId (SceOpenPsId *open_psid) |
| int | ksceSblAimgrGetPscode (ScePsCode *pscode) |
| int | ksceSblRngPseudoRandomNumber (void *result, SceSize size) |
| int | ksceSblDmac5AesCbcDec (const void *src, void *dst, int size, const void *key, int key_size, void *iv, int mask_enable) |
| int | ksceSblDmac5AesCbcEnc (const void *src, void *dst, int size, const void *key, int key_size, void *iv, int mask_enable) |
| int | ksceSblDmac5AesCtrDec (const void *src, void *dst, int size, const void *key, int key_size, void *iv, int mask_enable) |
| int | ksceSblSsDecryptWithPortability (SceUInt32 key_type, void *iv, ScePortabilityData *src, ScePortabilityData *dst) |
| int | ksceSblAimgrGetPscode2 (ScePsCode *ps_code) |
| Retrieve the secondary platform security code from aimgr_sm. | |
| int | ksceSblAimgrGetVisibleId (SceVisibleId *visible_id) |
| Retrieve the 32-byte visible identifier from aimgr_sm. | |
| int | ksceSblDmac5AesCbcDecNP (const void *src, void *dst, SceSize size, const void *key, SceSize key_length, void *iv, SceUInt32 key_id, SceBool mask_enable) |
| Decrypt data using AES-CBC and an AuthMgr-derived key. | |
| int | ksceSblDmac5AesCbcEncNP (const void *src, void *dst, SceSize size, const void *key, SceSize key_length, void *iv, SceUInt32 key_id, SceBool mask_enable) |
| Encrypt data using AES-CBC and an AuthMgr-derived key. | |
| int | ksceSblDmac5AesCmacNP (const void *src, void *dst, SceSize length, const void *key, SceSize keysize, SceSblDmac5AesCmacContext *ctx, SceUInt32 key_id, SceBool mask_enable, SceUInt32 flags) |
| Compute AES-CMAC using an AuthMgr-derived key. | |
| int | ksceSblDmac5AesCmacWithKeyslot (const void *src, void *dst, SceSize size, SceUInt32 keyslot, SceSize key_length, SceSblDmac5AesCmacContext *ctx, SceBool mask_enable, SceUInt32 flags) |
| Compute AES-CMAC using a preloaded DMAC5 key slot. | |
| int | ksceSblDmac5AesCtrEnc (const void *src, void *dst, SceSize size, const void *key, SceSize key_length, void *iv, SceBool mask_enable) |
| Encrypt or decrypt data using AES-CTR and a caller-supplied key. | |
| int | ksceSblDmac5AesEcbDec (const void *src, void *dst, SceSize size, const void *key, SceSize key_length, SceBool mask_enable) |
| Decrypt data using AES-ECB and a caller-supplied key. | |
| int | ksceSblDmac5AesEcbDecNP (const void *src, void *dst, SceSize size, const void *key, SceSize key_length, SceUInt32 key_id, SceBool mask_enable) |
| Decrypt data using AES-ECB and an AuthMgr-derived key. | |
| int | ksceSblDmac5AesEcbDecWithKeyslot (const void *src, void *dst, SceSize size, SceUInt32 keyslot, SceSize key_length, SceBool mask_enable) |
| Decrypt data using AES-ECB and a preloaded DMAC5 key slot. | |
| int | ksceSblDmac5AesEcbEnc (const void *src, void *dst, SceSize size, const void *key, SceSize key_length, SceBool mask_enable) |
| Encrypt data using AES-ECB and a caller-supplied key. | |
| int | ksceSblDmac5AesEcbEncNP (const void *src, void *dst, SceSize size, const void *key, SceSize key_length, SceUInt32 key_id, SceBool mask_enable) |
| Encrypt data using AES-ECB and an AuthMgr-derived 128- or 256-bit key. | |
| int | ksceSblDmac5AesEcbEncWithKeyslot (const void *src, void *dst, SceSize size, SceUInt32 keyslot, SceSize key_length, SceBool mask_enable) |
| Encrypt data using AES-ECB and a preloaded DMAC5 key slot. | |
| int | ksceSblDmac5DesCbcDecWithKeyslot (const void *src, void *dst, SceSize size, SceUInt32 keyslot, SceSize key_length, void *iv, SceBool mask_enable) |
| Decrypt data using DES or 3DES-CBC and a preloaded DMAC5 key slot. | |
| int | ksceSblDmac5DesCbcEncWithKeyslot (const void *src, void *dst, SceSize size, SceUInt32 keyslot, SceSize key_length, void *iv, SceBool mask_enable) |
| Encrypt data using DES or 3DES-CBC and a preloaded DMAC5 key slot. | |
| int | ksceSblDmac5DesEcbDecWithKeyslot (const void *src, void *dst, SceSize size, SceUInt32 keyslot, SceSize key_length, SceBool mask_enable) |
| Decrypt data using DES or 3DES-ECB and a preloaded DMAC5 key slot. | |
| int | ksceSblDmac5DesEcbEncWithKeyslot (const void *src, void *dst, SceSize size, SceUInt32 keyslot, SceSize key_length, SceBool mask_enable) |
| Encrypt data using DES or 3DES-ECB and a preloaded DMAC5 key slot. | |
| int | ksceSblDmac5Rnd (void *output_buffer, SceSize size, SceBool mask_enable) |
| Generate random bytes using DMAC5. | |
| int | ksceSblDmac5Sha1 (const void *src, void *dst, SceSize length, SceSblDmac5HashTransformContext *ctx, SceBool mask_enable, SceUInt32 flags) |
| Compute or continue a SHA-1 digest. | |
| int | ksceSblDmac5Sha1HmacNP (const void *src, void *dst, SceSize length, const void *key, SceSblDmac5HashTransformContext *ctx, SceUInt32 key_id, SceBool mask_enable, SceUInt32 flags) |
| Compute or continue a SHA-1 HMAC using an AuthMgr-derived 256-bit key. | |
| int | ksceSblDmac5Sha1HmacTransform (const void *src, void *dst, SceSize length, const void *key, SceSblDmac5HashTransformContext *ctx, SceBool mask_enable, SceUInt32 flags) |
| Compute or continue a SHA-1 HMAC using a caller-supplied 0x20-byte key. | |
| int | ksceSblDmac5Sha256Hmac (const void *src, void *dst, SceSize length, const void *key, SceSblDmac5HashTransformContext *ctx, SceBool mask_enable, SceUInt32 flags) |
| Compute or continue a SHA-256 HMAC using a caller-supplied 0x20-byte key. | |
| int | ksceSblNvsReadData (SceUInt32 offset, void *buffer, SceSize size) |
| Read an arbitrary Syscon NVS range in chunks of at most eight bytes. | |
| int | ksceSblNvsWriteData (SceUInt32 offset, const void *buffer, SceSize size) |
| Write an arbitrary Syscon NVS range in chunks of at most eight bytes. | |
| int | ksceSblQafManagerGetQAFlags (SceUInt8 buffer[0x10]) |
| Copy the 16 cached QA-flag bytes. | |
| int | ksceSblQafManagerGetQafName (char *buffer, SceSize max_len) |
| Copy the active QAF profile name. | |
| int | ksceSblQafMgrIsAllowControlIduAutoUpdate (void) |
| int | ksceSblQafMgrIsAllowDecryptedBootConfigLoad (void) |
| int | ksceSblQafMgrIsAllowDtcpIpReset (void) |
| int | ksceSblQafMgrIsAllowHost0Access (void) |
| int | ksceSblQafMgrIsAllowKeepCoreFile (void) |
| int | ksceSblQafMgrIsAllowLoadMagicGate (void) |
| int | ksceSblQafMgrIsAllowMarlinTest (void) |
| int | ksceSblQafMgrIsAllowNearTest (void) |
| int | ksceSblQafMgrIsAllowPSPEmuShowQAInfo (void) |
| int | ksceSblQafMgrIsAllowRemotePlayDebug (void) |
| int | ksceSblQafMgrIsAllowSystemAppDebug (void) |
| int | ksceSblRngGenuineRandomNumber (void *dest) |
| Generate exactly 0x40 bytes of DMAC5 genuine-random output. | |
| int | ksceSblSsCreatePassPhrase (const SceSblSsCreatePassPhraseParam *param, void *pass_phrase) |
| Create a 0x200-byte CMA pass phrase through aimgr_sm command 5. | |
| SceInt32 | ksceSblSsEncryptWithPortability (SceUInt32 key_type, const void *iv, const ScePortabilityData *plain_msg, ScePortabilityData *enc_msg) |
| Encrypt a portability message. | |
| int | ksceSblSsGetNvsData (SceSblSsNvsDataType type, void *data, SceSize size) |
| Read the NVS value selected by type. | |
| void * | ksceSblSsMemset (void *dest, int value, SceSize size) |
| Fill a memory range and return dest. | |
| int | ksceSblSsMgrExecuteDmac5HashCommand (const void *src, void *dst, SceSize size, void *ctx, SceBool mask_enable, SceUInt32 command, SceUInt32 flags) |
| Execute a DMAC5 hash-family command. | |
| int | ksceSblSsSetNvsData (SceSblSsNvsDataType type, const void *data, SceSize size) |
| Write the NVS value selected by type. | |
Exports for Kernel.
Include the header file in your project:
Include the header file in your project:
Link the library to the executable:
| struct SceVisibleId |
Opaque 32-byte visible identifier returned by aimgr_sm command 8.
| Data Fields | ||
|---|---|---|
| SceUInt8 | visible_id[0x20] | |
| struct SceOpenPsId |
Console-specific 16-byte OpenPSID.
| Data Fields | ||
|---|---|---|
| SceUInt8 | open_psid[0x10] | |
| struct SceConsoleId |
Sixteen-byte console identifier returned by aimgr_sm command 1.
| Data Fields | ||
|---|---|---|
| SceUInt16 | unk | Its purpose is unknown; the complete 16-byte identifier is cryptographically significant. |
| SceUInt16 | company_code | |
| SceUInt16 | product_code | |
| SceUInt16 | product_sub_code | |
| union SceConsoleId.__unnamed19__ | __unnamed__ | |
| SceUInt8 | unk3[7] | Its purpose is unknown; these bytes are used as part of the complete identifier. |
| struct ScePsCode |
| struct ScePortabilityData |
| struct SceSblSsCreatePassPhraseParam |
Parameters used to create the 0x200-byte CMA account pass phrase.
| Data Fields | ||
|---|---|---|
| SceUInt32 | secure_module_arg | Set to 0 by the observed FW 3.60 caller; forwarded to aimgr_sm command 5. Its purpose is unknown. |
| SceSize | size | Ignored on FW 3.60. |
| char | account_id_text[0x10] | Sixteen lowercase ASCII hexadecimal account-ID characters; not NUL-terminated. |
| struct SceSblDmac5AesCmacContext |
16-byte chaining value used by the AES-CMAC DMAC5 commands.
| Data Fields | ||
|---|---|---|
| SceUInt8 | state[0x10] | |
| struct SceSblDmac5HashTransformContext |
| union SceConsoleId.__unnamed19__ |
| Data Fields | ||
|---|---|---|
| struct SceConsoleId.__unnamed19__.__unnamed21__ | __unnamed__ | |
| SceUInt8 | chassis_check | |
| struct SceConsoleId.__unnamed19__.__unnamed21__ |
| #define ksceSblSsMgrAesCtrDecrypt ksceSblDmac5AesCtrDec |
| enum SceSblSsNvsDataType |
NVS values supported by ksceSblSsGetNvsData and ksceSblSsSetNvsData.
| enum SceSblDmac5HashFlag |
| enum SceSblDmac5Keyslot |
| VITASDK_BUILD_ASSERT_EQ | ( | 0x20 | , |
| SceVisibleId | |||
| ) |
| VITASDK_BUILD_ASSERT_EQ | ( | 0x10 | , |
| SceOpenPsId | |||
| ) |
| VITASDK_BUILD_ASSERT_EQ | ( | 0x10 | , |
| SceConsoleId | |||
| ) |
| VITASDK_BUILD_ASSERT_EQ | ( | 8 | , |
| ScePsCode | |||
| ) |
| VITASDK_BUILD_ASSERT_EQ | ( | 0x24 | , |
| ScePortabilityData | |||
| ) |
| VITASDK_BUILD_ASSERT_EQ | ( | 0x18 | , |
| SceSblSsCreatePassPhraseParam | |||
| ) |
| VITASDK_BUILD_ASSERT_EQ | ( | 0x10 | , |
| SceSblDmac5AesCmacContext | |||
| ) |
| VITASDK_BUILD_ASSERT_EQ | ( | 0x28 | , |
| SceSblDmac5HashTransformContext | |||
| ) |
| int ksceSblAimgrGetConsoleId | ( | SceConsoleId * | cid | ) |
| int ksceSblAimgrGetOpenPsId | ( | SceOpenPsId * | open_psid | ) |
| int ksceSblAimgrGetPscode | ( | ScePsCode * | pscode | ) |
| int ksceSblRngPseudoRandomNumber | ( | void * | result, |
| SceSize | size | ||
| ) |
| int ksceSblDmac5AesCbcDec | ( | const void * | src, |
| void * | dst, | ||
| int | size, | ||
| const void * | key, | ||
| int | key_size, | ||
| void * | iv, | ||
| int | mask_enable | ||
| ) |
| int ksceSblDmac5AesCbcEnc | ( | const void * | src, |
| void * | dst, | ||
| int | size, | ||
| const void * | key, | ||
| int | key_size, | ||
| void * | iv, | ||
| int | mask_enable | ||
| ) |
| int ksceSblDmac5AesCtrDec | ( | const void * | src, |
| void * | dst, | ||
| int | size, | ||
| const void * | key, | ||
| int | key_size, | ||
| void * | iv, | ||
| int | mask_enable | ||
| ) |
| int ksceSblSsDecryptWithPortability | ( | SceUInt32 | key_type, |
| void * | iv, | ||
| ScePortabilityData * | src, | ||
| ScePortabilityData * | dst | ||
| ) |
| int ksceSblAimgrGetPscode2 | ( | ScePsCode * | ps_code | ) |
Retrieve the secondary platform security code from aimgr_sm.
The four 16-bit fields are returned in host byte order. This operation is available only when the product-mode check allows it.
| [out] | ps_code | - Required eight-byte output. |
| int ksceSblAimgrGetVisibleId | ( | SceVisibleId * | visible_id | ) |
Retrieve the 32-byte visible identifier from aimgr_sm.
| [out] | visible_id | - Required output buffer. |
| int ksceSblDmac5AesCbcDecNP | ( | const void * | src, |
| void * | dst, | ||
| SceSize | size, | ||
| const void * | key, | ||
| SceSize | key_length, | ||
| void * | iv, | ||
| SceUInt32 | key_id, | ||
| SceBool | mask_enable | ||
| ) |
Decrypt data using AES-CBC and an AuthMgr-derived key.
| [in] | src | - Input data. |
| [out] | dst | - Output data. |
| [in] | size | - Data size; must be a multiple of 0x10. |
| [in] | key | - Key material supplied to AuthMgr. |
| [in] | key_length | - Key size in bits: 128 or 256. AuthMgr rejects 192 bits on FW 3.60. |
| [in,out] | iv | - Required 16-byte IV, updated after the operation. |
| [in] | key_id | - AuthMgr key identifier: 0, 0x10000, 0x10001, 0x20000, or 0x20001. |
| [in] | mask_enable | - Nonzero to enable the DMAC memory-access mask. |
| int ksceSblDmac5AesCbcEncNP | ( | const void * | src, |
| void * | dst, | ||
| SceSize | size, | ||
| const void * | key, | ||
| SceSize | key_length, | ||
| void * | iv, | ||
| SceUInt32 | key_id, | ||
| SceBool | mask_enable | ||
| ) |
Encrypt data using AES-CBC and an AuthMgr-derived key.
Parameters and return values are the same as ksceSblDmac5AesCbcDecNP.
| int ksceSblDmac5AesCmacNP | ( | const void * | src, |
| void * | dst, | ||
| SceSize | length, | ||
| const void * | key, | ||
| SceSize | keysize, | ||
| SceSblDmac5AesCmacContext * | ctx, | ||
| SceUInt32 | key_id, | ||
| SceBool | mask_enable, | ||
| SceUInt32 | flags | ||
| ) |
Compute AES-CMAC using an AuthMgr-derived key.
| [in] | src | - Input data. |
| [out] | dst | - Optional 16-byte MAC output. |
| [in] | length | - Input size. |
| [in] | key | - Key material supplied to AuthMgr. |
| [in] | keysize | - Key size in bits: 128 or 256. |
| [in,out] | ctx | - Optional 0x10-byte AES-CMAC chaining context. |
| [in] | key_id | - AuthMgr key identifier: 0, 0x10000, 0x10001, 0x20000, or 0x20001. |
| [in] | mask_enable | - Nonzero to enable the DMAC memory-access mask. |
| [in] | flags | - Bitwise OR of SceSblDmac5HashFlag values. |
| int ksceSblDmac5AesCmacWithKeyslot | ( | const void * | src, |
| void * | dst, | ||
| SceSize | size, | ||
| SceUInt32 | keyslot, | ||
| SceSize | key_length, | ||
| SceSblDmac5AesCmacContext * | ctx, | ||
| SceBool | mask_enable, | ||
| SceUInt32 | flags | ||
| ) |
Compute AES-CMAC using a preloaded DMAC5 key slot.
| [in] | src | - Input data. |
| [out] | dst | - Optional 16-byte MAC output. |
| [in] | size | - Input size. |
| [in] | keyslot | - One of SceSblDmac5Keyslot. |
| [in] | key_length | - Key size in bits: 128, 192, or 256. |
| [in,out] | ctx | - Optional 0x10-byte chaining context. |
| [in] | mask_enable | - Nonzero to enable the DMAC memory-access mask. |
| [in] | flags | - Bitwise OR of SceSblDmac5HashFlag values. |
| int ksceSblDmac5AesCtrEnc | ( | const void * | src, |
| void * | dst, | ||
| SceSize | size, | ||
| const void * | key, | ||
| SceSize | key_length, | ||
| void * | iv, | ||
| SceBool | mask_enable | ||
| ) |
Encrypt or decrypt data using AES-CTR and a caller-supplied key.
| [in] | src | - Input data. |
| [out] | dst | - Output data. |
| [in] | size | - Data size. |
| [in] | key | - AES key. |
| [in] | key_length | - Key size in bits: 128, 192, or 256. |
| [in,out] | iv | - Required 16-byte counter, updated after the operation. |
| [in] | mask_enable | - Nonzero to enable the DMAC memory-access mask. |
| int ksceSblDmac5AesEcbDec | ( | const void * | src, |
| void * | dst, | ||
| SceSize | size, | ||
| const void * | key, | ||
| SceSize | key_length, | ||
| SceBool | mask_enable | ||
| ) |
Decrypt data using AES-ECB and a caller-supplied key.
| [in] | src | - Input data. |
| [out] | dst | - Output data. |
| [in] | size | - Data size; must be a multiple of 0x10. |
| [in] | key | - AES key. |
| [in] | key_length | - Key size in bits: 128, 192, or 256. |
| [in] | mask_enable | - Nonzero to enable the DMAC memory-access mask. |
| int ksceSblDmac5AesEcbDecNP | ( | const void * | src, |
| void * | dst, | ||
| SceSize | size, | ||
| const void * | key, | ||
| SceSize | key_length, | ||
| SceUInt32 | key_id, | ||
| SceBool | mask_enable | ||
| ) |
Decrypt data using AES-ECB and an AuthMgr-derived key.
| [in] | src | - Input data. |
| [out] | dst | - Output data. |
| [in] | size | - Data size; must be a multiple of 0x10. |
| [in] | key | - Key material supplied to AuthMgr. |
| [in] | key_length | - Key size in bits: 128 or 256. |
| [in] | key_id | - AuthMgr key identifier: 0, 0x10000, 0x10001, 0x20000, or 0x20001. |
| [in] | mask_enable | - Nonzero to enable the DMAC memory-access mask. |
| int ksceSblDmac5AesEcbDecWithKeyslot | ( | const void * | src, |
| void * | dst, | ||
| SceSize | size, | ||
| SceUInt32 | keyslot, | ||
| SceSize | key_length, | ||
| SceBool | mask_enable | ||
| ) |
Decrypt data using AES-ECB and a preloaded DMAC5 key slot.
| [in] | keyslot | - One of SceSblDmac5Keyslot. |
Other parameters and return values are the same as ksceSblDmac5AesEcbDec.
| int ksceSblDmac5AesEcbEnc | ( | const void * | src, |
| void * | dst, | ||
| SceSize | size, | ||
| const void * | key, | ||
| SceSize | key_length, | ||
| SceBool | mask_enable | ||
| ) |
Encrypt data using AES-ECB and a caller-supplied key.
| int ksceSblDmac5AesEcbEncNP | ( | const void * | src, |
| void * | dst, | ||
| SceSize | size, | ||
| const void * | key, | ||
| SceSize | key_length, | ||
| SceUInt32 | key_id, | ||
| SceBool | mask_enable | ||
| ) |
Encrypt data using AES-ECB and an AuthMgr-derived 128- or 256-bit key.
| int ksceSblDmac5AesEcbEncWithKeyslot | ( | const void * | src, |
| void * | dst, | ||
| SceSize | size, | ||
| SceUInt32 | keyslot, | ||
| SceSize | key_length, | ||
| SceBool | mask_enable | ||
| ) |
Encrypt data using AES-ECB and a preloaded DMAC5 key slot.
| [in] | keyslot | - One of SceSblDmac5Keyslot. |
| int ksceSblDmac5DesCbcDecWithKeyslot | ( | const void * | src, |
| void * | dst, | ||
| SceSize | size, | ||
| SceUInt32 | keyslot, | ||
| SceSize | key_length, | ||
| void * | iv, | ||
| SceBool | mask_enable | ||
| ) |
Decrypt data using DES or 3DES-CBC and a preloaded DMAC5 key slot.
| [in] | keyslot | - One of SceSblDmac5Keyslot. |
| [in,out] | iv | - Required eight-byte IV, updated after the operation. |
| int ksceSblDmac5DesCbcEncWithKeyslot | ( | const void * | src, |
| void * | dst, | ||
| SceSize | size, | ||
| SceUInt32 | keyslot, | ||
| SceSize | key_length, | ||
| void * | iv, | ||
| SceBool | mask_enable | ||
| ) |
Encrypt data using DES or 3DES-CBC and a preloaded DMAC5 key slot.
| int ksceSblDmac5DesEcbDecWithKeyslot | ( | const void * | src, |
| void * | dst, | ||
| SceSize | size, | ||
| SceUInt32 | keyslot, | ||
| SceSize | key_length, | ||
| SceBool | mask_enable | ||
| ) |
Decrypt data using DES or 3DES-ECB and a preloaded DMAC5 key slot.
| int ksceSblDmac5DesEcbEncWithKeyslot | ( | const void * | src, |
| void * | dst, | ||
| SceSize | size, | ||
| SceUInt32 | keyslot, | ||
| SceSize | key_length, | ||
| SceBool | mask_enable | ||
| ) |
Encrypt data using DES or 3DES-ECB and a preloaded DMAC5 key slot.
Generate random bytes using DMAC5.
| [out] | output_buffer | - Output buffer; required when size is nonzero. |
| [in] | size | - Number of bytes to generate. Must be at most 0x40. |
| [in] | mask_enable | - Nonzero to apply the DMAC access mask. |
| int ksceSblDmac5Sha1 | ( | const void * | src, |
| void * | dst, | ||
| SceSize | length, | ||
| SceSblDmac5HashTransformContext * | ctx, | ||
| SceBool | mask_enable, | ||
| SceUInt32 | flags | ||
| ) |
Compute or continue a SHA-1 digest.
| [in] | src | - Input data. |
| [out] | dst | - Optional 20-byte digest output. |
| [in] | length | - Input size. |
| [in,out] | ctx | - Optional 0x28-byte SHA chaining context. |
| [in] | mask_enable | - Nonzero to enable the DMAC memory-access mask. |
| [in] | flags | - Bitwise OR of SceSblDmac5HashFlag values. |
| int ksceSblDmac5Sha1HmacNP | ( | const void * | src, |
| void * | dst, | ||
| SceSize | length, | ||
| const void * | key, | ||
| SceSblDmac5HashTransformContext * | ctx, | ||
| SceUInt32 | key_id, | ||
| SceBool | mask_enable, | ||
| SceUInt32 | flags | ||
| ) |
Compute or continue a SHA-1 HMAC using an AuthMgr-derived 256-bit key.
| [in] | key | - 0x20-byte key material supplied to AuthMgr. |
| [in] | key_id | - AuthMgr key identifier: 0, 0x10000, 0x10001, 0x20000, or 0x20001. |
Other parameters and return values are the same as ksceSblDmac5Sha1.
| int ksceSblDmac5Sha1HmacTransform | ( | const void * | src, |
| void * | dst, | ||
| SceSize | length, | ||
| const void * | key, | ||
| SceSblDmac5HashTransformContext * | ctx, | ||
| SceBool | mask_enable, | ||
| SceUInt32 | flags | ||
| ) |
Compute or continue a SHA-1 HMAC using a caller-supplied 0x20-byte key.
| int ksceSblDmac5Sha256Hmac | ( | const void * | src, |
| void * | dst, | ||
| SceSize | length, | ||
| const void * | key, | ||
| SceSblDmac5HashTransformContext * | ctx, | ||
| SceBool | mask_enable, | ||
| SceUInt32 | flags | ||
| ) |
Compute or continue a SHA-256 HMAC using a caller-supplied 0x20-byte key.
dst receives 0x20 bytes for a completed operation.
Read an arbitrary Syscon NVS range in chunks of at most eight bytes.
| [in] | offset | - NVS byte offset. |
| [out] | buffer | - Destination buffer. It may be NULL only when size is 0. |
| [in] | size | - Number of bytes to read. |
Write an arbitrary Syscon NVS range in chunks of at most eight bytes.
| [in] | offset | - NVS byte offset. |
| [in] | buffer | - Source buffer. It may be NULL only when size is 0. |
| [in] | size | - Number of bytes to write. |
| int ksceSblQafManagerGetQAFlags | ( | SceUInt8 | buffer[0x10] | ) |
Copy the 16 cached QA-flag bytes.
| [out] | buffer | - Required 0x10-byte output buffer. |
| int ksceSblQafManagerGetQafName | ( | char * | buffer, |
| SceSize | max_len | ||
| ) |
Copy the active QAF profile name.
Values of max_len above 0x18 are treated as 0x18. The resulting string is always NUL-terminated within the selected range.
| [out] | buffer | - Required profile-name buffer. |
| [in] | max_len | - Number of writable bytes; must be nonzero. |
| int ksceSblQafMgrIsAllowControlIduAutoUpdate | ( | void | ) |
| int ksceSblQafMgrIsAllowDecryptedBootConfigLoad | ( | void | ) |
| int ksceSblQafMgrIsAllowDtcpIpReset | ( | void | ) |
| int ksceSblQafMgrIsAllowHost0Access | ( | void | ) |
host0: access, otherwise 0. | int ksceSblQafMgrIsAllowKeepCoreFile | ( | void | ) |
| int ksceSblQafMgrIsAllowLoadMagicGate | ( | void | ) |
| int ksceSblQafMgrIsAllowMarlinTest | ( | void | ) |
| int ksceSblQafMgrIsAllowNearTest | ( | void | ) |
| int ksceSblQafMgrIsAllowPSPEmuShowQAInfo | ( | void | ) |
| int ksceSblQafMgrIsAllowRemotePlayDebug | ( | void | ) |
| int ksceSblQafMgrIsAllowSystemAppDebug | ( | void | ) |
| int ksceSblRngGenuineRandomNumber | ( | void * | dest | ) |
Generate exactly 0x40 bytes of DMAC5 genuine-random output.
| [out] | dest | - Required 0x40-byte output buffer. |
| int ksceSblSsCreatePassPhrase | ( | const SceSblSsCreatePassPhraseParam * | param, |
| void * | pass_phrase | ||
| ) |
Create a 0x200-byte CMA pass phrase through aimgr_sm command 5.
The function copies the 16 account-ID characters, IdStorage leaf 0x44, and the current secure tick into the secure-module request. It does not inspect SceSblSsCreatePassPhraseParam::size.
| [in] | param | - Required 0x18-byte input parameters. |
| [out] | pass_phrase | - Required 0x200-byte output buffer. |
| SceInt32 ksceSblSsEncryptWithPortability | ( | SceUInt32 | key_type, |
| const void * | iv, | ||
| const ScePortabilityData * | plain_msg, | ||
| ScePortabilityData * | enc_msg | ||
| ) |
Encrypt a portability message.
On FW 3.60 only key type 0 succeeds; after validating the current process's SELF authentication information, it copies the plaintext message unchanged. Key types 1 through 20 return an invalid-argument error without invoking a secure module. The input and output message sizes must match, be at most 0x20, and be multiples of 0x10.
| [in] | key_type | - Portability key type, from 0 through 20. |
| [in] | iv | - Required 0x10-byte IV. |
| [in] | plain_msg | - Required plaintext message. |
| [in,out] | enc_msg | - Required output whose ScePortabilityData::msg_size is initialized to the plaintext message size. |
| int ksceSblSsGetNvsData | ( | SceSblSsNvsDataType | type, |
| void * | data, | ||
| SceSize | size | ||
| ) |
Read the NVS value selected by type.
size must be 1, 2, 4, 8, 16, or 32 and must be at least the selected value's size. Only that value's bytes are copied.
| [in] | type | - NVS value to read. |
| [out] | data | - Required output buffer. |
| [in] | size | - Caller buffer size, subject to the limits above. |
| void * ksceSblSsMemset | ( | void * | dest, |
| int | value, | ||
| SceSize | size | ||
| ) |
Fill a memory range and return dest.
| [out] | dest | - Destination memory. |
| [in] | value | - Byte value; only the low eight bits are used. |
| [in] | size | - Number of bytes to write. |
| int ksceSblSsMgrExecuteDmac5HashCommand | ( | const void * | src, |
| void * | dst, | ||
| SceSize | size, | ||
| void * | ctx, | ||
| SceBool | mask_enable, | ||
| SceUInt32 | command, | ||
| SceUInt32 | flags | ||
| ) |
Execute a DMAC5 hash-family command.
| [in] | src | - Input data. |
| [out] | dst | - Optional command-dependent digest or MAC output. |
| [in] | size | - Input size. |
| [in,out] | ctx | - Command-dependent chaining context. SHA-family commands use a SceSblDmac5HashTransformContext; AES-CMAC uses a 0x10-byte context. |
| [in] | mask_enable | - Nonzero to apply the DMAC access mask. |
| [in] | command | - DMAC5 base command. |
| [in] | flags | - Bitwise OR of SceSblDmac5HashFlag values. |
| int ksceSblSsSetNvsData | ( | SceSblSsNvsDataType | type, |
| const void * | data, | ||
| SceSize | size | ||
| ) |
Write the NVS value selected by type.
size follows the same validation rules as ksceSblSsGetNvsData. Only the selected value's bytes are written.
| [in] | type | - NVS value to write. |
| [in] | data | - Required source buffer. |
| [in] | size | - Caller buffer size, subject to the limits above. |
| SceUInt8 SceVisibleId::visible_id[0x20] |
| SceUInt8 SceOpenPsId::open_psid[0x10] |
| SceUInt16 SceConsoleId::unk |
Its purpose is unknown; the complete 16-byte identifier is cryptographically significant.
| SceUInt16 SceConsoleId::company_code |
| SceUInt16 SceConsoleId::product_code |
| SceUInt16 SceConsoleId::product_sub_code |
| SceUInt8 { ... } ::unk2 |
Not interpreted by the FW 3.60 callers examined.
| SceUInt8 { ... } ::factory_code |
| struct { ... } SceConsoleId |
| SceUInt8 { ... } ::chassis_check |
| union { ... } SceConsoleId |
| SceUInt8 SceConsoleId::unk3[7] |
Its purpose is unknown; these bytes are used as part of the complete identifier.
| SceUInt16 ScePsCode::company_code |
| SceUInt16 ScePsCode::product_code |
| SceUInt16 ScePsCode::product_sub_code |
| SceUInt16 ScePsCode::factory_code |
| SceSize ScePortabilityData::msg_size |
Message size; must be 0, 0x10, or 0x20 on FW 3.60.
| SceUInt8 ScePortabilityData::msg[0x20] |
| SceUInt32 SceSblSsCreatePassPhraseParam::secure_module_arg |
Set to 0 by the observed FW 3.60 caller; forwarded to aimgr_sm command 5. Its purpose is unknown.
| SceSize SceSblSsCreatePassPhraseParam::size |
Ignored on FW 3.60.
| char SceSblSsCreatePassPhraseParam::account_id_text[0x10] |
Sixteen lowercase ASCII hexadecimal account-ID characters; not NUL-terminated.
| SceUInt8 SceSblDmac5AesCmacContext::state[0x10] |
| SceUInt32 SceSblDmac5HashTransformContext::state[8] |
Intermediate hash state.
| SceUInt64 SceSblDmac5HashTransformContext::length |
Length of input processed so far, maintained by DMAC5.