uOFW
Reverse engineered PSP kernel 6.60.
Loading...
Searching...
No Matches
Macros | Functions

Macros

#define SCE_DNAS_USER_DATA_MAX_LEN   2048
 

Functions

s32 sceDdrdbDecrypt (u8 *pSrcData, SceSize size)
 
s32 sceDdrdbEncrypt (u8 *pSrcData, SceSize size)
 
s32 sceDdrdbHash (u8 *pSrcData, SceSize size, u8 *pDigest)
 
s32 sceDdrdbMul1 (u8 *pKeyData)
 
s32 sceDdrdbMul2 (u8 *pPrivKey, u8 *pBasePoint, u8 *pNewPoint)
 
s32 sceDdrdbSigvry (u8 *pPubKey, u8 *pData, u8 *pSig)
 
s32 sceDdrdbCertvry (u8 *pCert)
 
s32 sceDdrdbSiggen (u8 *pPrivKey, u8 *pSrcData, u8 *pSig)
 
s32 sceDdrdbPrngen (u8 *pDstData)
 
s32 sceDdrdb_F013F8BF (u8 *pData, u8 *pSig)
 

Detailed Description

Macro Definition Documentation

◆ SCE_DNAS_USER_DATA_MAX_LEN

#define SCE_DNAS_USER_DATA_MAX_LEN   2048

Maximum size of a source buffer in byte.

Function Documentation

◆ sceDdrdbDecrypt()

s32 sceDdrdbDecrypt ( u8 *  pSrcData,
SceSize  size 
)

Decrypt the provided data. The data has to be AES encrypted.

Note
The used key is provided by the PSP.
Parameters
pSrcDataPointer to data to decrypt. The decrypted data will be written
back into this buffer.
sizeThe size of the data to decrypt. The size needs to be a multiple of KIRK_AES_BLOCK_LEN.
Max size: SCE_DNAS_USER_DATA_MAX_LEN.
Returns
0 on success, otherwise < 0.

◆ sceDdrdbEncrypt()

s32 sceDdrdbEncrypt ( u8 *  pSrcData,
SceSize  size 
)

Encrypt the provided data. It will be encrypted using AES.

Note
The used key is provided by the PSP.
Parameters
pSrcDataPointer to data to encrypt. The encrypted data will be written back into this buffer.
sizeThe size of the data to encrypt. The size needs to be a multiple of KIRK_AES_BLOCK_LEN.
Max size: SCE_DNAS_USER_DATA_MAX_LEN.
Returns
0 on success, otherwise < 0.

◆ sceDdrdbHash()

s32 sceDdrdbHash ( u8 *  pSrcData,
SceSize  size,
u8 *  pDigest 
)

Generate a SHA-1 hash value of the provided data.

Parameters
pSrcDataPointer to data to generate the hash for.
sizeThe size of the source data. Max size: SCE_DNAS_USER_DATA_MAX_LEN.
pDigestPointer to buffer receiving the hash. Size: KIRK_SHA1_DIGEST_LEN.
Returns
0 on success, otherwise < 0.

◆ sceDdrdbMul1()

s32 sceDdrdbMul1 ( u8 *  pKeyData)

Generate a new (public,private) key pair to use with ECDSA.

Parameters
pKeyDataPointer to buffer receiving the computed key pair.
The first KIRK_ECDSA_PRIVATE_KEY_LEN byte will contain the private key.
The rest of the bytes will contain the public key (elliptic curve) point p = (x,y),
with the x-value being first. Both coordinates have size KIRK_ECDSA_POINT_LEN / 2.
Returns
0 on success, otherwise < 0.

◆ sceDdrdbMul2()

s32 sceDdrdbMul2 ( u8 *  pPrivKey,
u8 *  pBasePoint,
u8 *  pNewPoint 
)

Compute a new elliptic curve point by multiplying the provided private key with the
provided base point of the elliptic curve.

Parameters
pPrivKeyPointer to the private key of a (public,private) key pair usable for ECDSA.
pBasePointPointer to a base point of the elliptic curve. Point size: KIRK_ECDSA_POINT_LEN
pNewPointPointer to a buffer receiving the new curve point. Buffer size: KIRK_ECDSA_POINT_LEN
Returns
0 on success, otherwise < 0.

◆ sceDdrdbSigvry()

s32 sceDdrdbSigvry ( u8 *  pPubKey,
u8 *  pData,
u8 *  pSig 
)

Verify if the provided signature is valid for the specified data given the public key.

Note
The ECDSA algorithm is used to verify a signature.
Parameters
pPubKeyThe public key used for validating the (data,signature) pair.
Size has to be KIRK_ECDSA_PUBLIC_KEY_LEN.
pDataPointer to data the signature has to be verified for.
Data length: KIRK_ECDSA_SRC_DATA_LEN
pSigPointer to the signature to verify. Signature length: KIRK_ECDSA_SIG_LEN
Returns
0 on success, otherwise < 0.

◆ sceDdrdbCertvry()

s32 sceDdrdbCertvry ( u8 *  pCert)

Verify a certificate.

Parameters
pCertPointer to the certificate to verify. Certificate length: KIRK_CERT_LEN.
Returns
0 on success, otherwise < 0.

◆ sceDdrdbSiggen()

s32 sceDdrdbSiggen ( u8 *  pPrivKey,
u8 *  pSrcData,
u8 *  pSig 
)

Generate a valid signature for the specified data using the specified private key.

Note
The ECDSA algorithm is used to generate a signature.
Parameters
pPrivKeyPointer to the private key used to generate the signature.
CONFIRM: The key has to be AES encrypted before.
pDataPointer to data a signature has to be computed for. Data length: KIRK_ECDSA_SRC_DATA_LEN
pSigPointer to a buffer receiving the signature. Signature length: KIRK_ECDSA_SIG_LEN
Returns
0 on success, otherwise < 0.

◆ sceDdrdbPrngen()

s32 sceDdrdbPrngen ( u8 *  pDstData)

Generate a KIRK_PRN_LEN large pseudorandom number (PRN).

Note
The seed is automatically set by the system software.
Parameters
pDstDataPointer to buffer receiving the PRN. Size has to be KIRK_PRN_LEN.
Returns
0 on success, otherwise < 0.

◆ sceDdrdb_F013F8BF()

s32 sceDdrdb_F013F8BF ( u8 *  pData,
u8 *  pSig 
)

Verify if the provided signature is valid for the specified data. The public key
is provided by the system software.

Note
The ECDSA algorithm is used to verify a signature.
Parameters
pDataPointer to data the signature has to be verified for.
Data length: KIRK_ECDSA_SRC_DATA_LEN.
pSigPointer to the signature to verify. Signature length: KIRK_ECDSA_SIG_LEN.
Returns
0 on success, otherwise < 0.