Result PS_GetLocalFriendCodeSeed(u64 *seed)
Gets the 64-bit console friend code seed.
Result PS_GenerateRandomBytes(void *out, size_t len)
Generates cryptographically secure random bytes.
PS_AESKeyType
PS key slots.
Definition: ps.h:20
@ PS_KEYSLOT_2E
Key slot 0x2E.
Definition: ps.h:27
@ PS_KEYSLOT_31
Key slot 0x31.
Definition: ps.h:23
@ PS_KEYSLOT_38
Key slot 0x38.
Definition: ps.h:24
@ PS_KEYSLOT_0D
Key slot 0x0D.
Definition: ps.h:21
@ PS_KEYSLOT_36
Key slot 0x36.
Definition: ps.h:29
@ PS_KEYSLOT_39_NFC
Key slot 0x39. (NFC)
Definition: ps.h:30
@ PS_KEYSLOT_32
Key slot 0x32.
Definition: ps.h:25
@ PS_KEYSLOT_INVALID
Invalid key slot.
Definition: ps.h:28
@ PS_KEYSLOT_39_DLP
Key slot 0x39. (DLP)
Definition: ps.h:26
@ PS_KEYSLOT_2D
Key slot 0x2D.
Definition: ps.h:22
Result PS_EncryptSignDecryptVerifyAesCcm(u8 *in, u32 in_size, u8 *out, u32 out_size, u32 data_len, u32 mac_data_len, u32 mac_len, PS_AESAlgorithm aes_algo, PS_AESKeyType key_type, u8 *nonce)
Encrypts/Decrypts signed AES CCM data.
void psExit(void)
Exits PS.
Result psInitHandle(Handle handle)
Initializes PS with the specified session handle.
PS_AESAlgorithm
PS AES algorithms.
Definition: ps.h:9
@ PS_ALGORITHM_CBC_ENC
CBC encryption.
Definition: ps.h:10
@ PS_ALGORITHM_CTR_DEC
CTR decryption(same as PS_ALGORITHM_CTR_ENC).
Definition: ps.h:13
@ PS_ALGORITHM_CTR_ENC
CTR encryption.
Definition: ps.h:12
@ PS_ALGORITHM_CBC_DEC
CBC decryption.
Definition: ps.h:11
@ PS_ALGORITHM_CCM_DEC
CCM decryption.
Definition: ps.h:15
@ PS_ALGORITHM_CCM_ENC
CCM encryption.
Definition: ps.h:14
Result psInit(void)
Initializes PS.
Result PS_GetDeviceId(u32 *device_id)
Gets the 32-bit device ID.
Handle psGetSessionHandle(void)
Returns the PS session handle.
Result PS_VerifyRsaSha256(u8 *hash, psRSAContext *ctx, u8 *signature)
Verifies a RSA signature.
Result PS_EncryptDecryptAes(u32 size, u8 *in, u8 *out, PS_AESAlgorithm aes_algo, PS_AESKeyType key_type, u8 *iv)
Encrypts/Decrypts AES data.
Result PS_SignRsaSha256(u8 *hash, psRSAContext *ctx, u8 *signature)
Signs a RSA signature.
RSA context.
Definition: ps.h:34
uint64_t u64
64-bit unsigned integer
Definition: types.h:24
uint8_t u8
would be nice if newlib had this already
Definition: types.h:21
u32 Handle
Resource handle.
Definition: types.h:41
s32 Result
Function result.
Definition: types.h:42
uint32_t u32
32-bit unsigned integer
Definition: types.h:23