vitasdk
Documentation of the vitasdk

Exports for Kernel. More...

Data Structures

struct  SceSblGcAuthMgrMlnpsnlAuth1Request
 MLNPSNL phase-one request. More...
 
struct  SceSblGcAuthMgrMlnpsnlAuth1Response
 MLNPSNL phase-one client packet. More...
 
struct  SceSblGcAuthMgrMlnpsnlSessionData
 Caller-owned state linking MLNPSNL authentication phases one and two. More...
 

Functions

 VITASDK_BUILD_ASSERT_EQ (0x20, SceSblGcAuthMgrMlnpsnlAuth1Request)
 
 VITASDK_BUILD_ASSERT_EQ (0x80, SceSblGcAuthMgrMlnpsnlAuth1Response)
 
 VITASDK_BUILD_ASSERT_EQ (0x40, SceSblGcAuthMgrMlnpsnlSessionData)
 
int ksceSblGcAuthMgrMlnpsnlAuth1 (const SceSblGcAuthMgrMlnpsnlAuth1Request *request, const SceRtcTick *secure_tick, SceSblGcAuthMgrMlnpsnlAuth1Response *response, SceSblGcAuthMgrMlnpsnlSessionData *session_data)
 Perform the first MLNPSNL authentication phase.
 

Variables

SceUInt8 SceSblGcAuthMgrMlnpsnlAuth1Request::mode
 Authentication mode used by the remote protocol.
 
SceUInt8 SceSblGcAuthMgrMlnpsnlAuth1Request::request_data [0x1F]
 Remaining authenticated request data.
 
SceUInt8 SceSblGcAuthMgrMlnpsnlAuth1Response::packet_type
 Set to 0x20.
 
SceUInt8 SceSblGcAuthMgrMlnpsnlAuth1Response::phase
 Set to 1.
 
SceUInt8 SceSblGcAuthMgrMlnpsnlAuth1Response::packet_size
 Set to 0x80.
 
SceUInt8 SceSblGcAuthMgrMlnpsnlAuth1Response::reserved [0xD]
 Set to zero.
 
SceUInt8 SceSblGcAuthMgrMlnpsnlAuth1Response::protected_data [0x60]
 Protected phase-one authentication data.
 
SceUInt8 SceSblGcAuthMgrMlnpsnlAuth1Response::authentication_tag [0x10]
 Packet authentication tag.
 
SceUInt8 SceSblGcAuthMgrMlnpsnlSessionData::session_key [0x10]
 Candidate key copied to the final output only after phase-two verification.
 
SceUInt8 SceSblGcAuthMgrMlnpsnlSessionData::binding_data [0x10]
 Value used to bind the decrypted phase-two response to this session.
 
SceUInt8 SceSblGcAuthMgrMlnpsnlSessionData::phase_one_packet_size
 Set to 0x80 and required in the phase-two header.
 
SceUInt8 SceSblGcAuthMgrMlnpsnlSessionData::reserved [0x1F]
 Set to zero.
 

Detailed Description

Exports for Kernel.


Using this library in your project

Include the header file in your project:




Using this library in your project

Include the header file in your project:


Link the library to the executable:

SceSblGcAuthMgrMlnpsnlForDriver_stub




Data Structure Documentation

◆ SceSblGcAuthMgrMlnpsnlAuth1Request

struct SceSblGcAuthMgrMlnpsnlAuth1Request

MLNPSNL phase-one request.

FW 3.60 uses all 0x20 bytes when generating the protected response. Observed system callers zero the structure and set mode to 0, 0x10, or 0x11.

Data Fields
SceUInt8 mode Authentication mode used by the remote protocol.
SceUInt8 request_data[0x1F] Remaining authenticated request data.

◆ SceSblGcAuthMgrMlnpsnlAuth1Response

struct SceSblGcAuthMgrMlnpsnlAuth1Response

MLNPSNL phase-one client packet.

Data Fields
SceUInt8 packet_type Set to 0x20.
SceUInt8 phase Set to 1.
SceUInt8 packet_size Set to 0x80.
SceUInt8 reserved[0xD] Set to zero.
SceUInt8 protected_data[0x60] Protected phase-one authentication data.
SceUInt8 authentication_tag[0x10] Packet authentication tag.

◆ SceSblGcAuthMgrMlnpsnlSessionData

struct SceSblGcAuthMgrMlnpsnlSessionData

Caller-owned state linking MLNPSNL authentication phases one and two.

Keep this structure unchanged until phase two completes. The phase-one function does not retain its address after returning.

Data Fields
SceUInt8 session_key[0x10] Candidate key copied to the final output only after phase-two verification.
SceUInt8 binding_data[0x10] Value used to bind the decrypted phase-two response to this session.
SceUInt8 phase_one_packet_size Set to 0x80 and required in the phase-two header.
SceUInt8 reserved[0x1F] Set to zero.

Function Documentation

◆ VITASDK_BUILD_ASSERT_EQ() [1/3]

VITASDK_BUILD_ASSERT_EQ ( 0x20  ,
SceSblGcAuthMgrMlnpsnlAuth1Request   
)

◆ VITASDK_BUILD_ASSERT_EQ() [2/3]

VITASDK_BUILD_ASSERT_EQ ( 0x80  ,
SceSblGcAuthMgrMlnpsnlAuth1Response   
)

◆ VITASDK_BUILD_ASSERT_EQ() [3/3]

VITASDK_BUILD_ASSERT_EQ ( 0x40  ,
SceSblGcAuthMgrMlnpsnlSessionData   
)

◆ ksceSblGcAuthMgrMlnpsnlAuth1()

int ksceSblGcAuthMgrMlnpsnlAuth1 ( const SceSblGcAuthMgrMlnpsnlAuth1Request *  request,
const SceRtcTick *  secure_tick,
SceSblGcAuthMgrMlnpsnlAuth1Response *  response,
SceSblGcAuthMgrMlnpsnlSessionData *  session_data 
)

Perform the first MLNPSNL authentication phase.

All pointers must be non-NULL. The input buffers must remain valid until this function returns; they are not used afterwards. The function clears both output structures before cryptographic processing and retains no caller pointer after returning. Do not use either output unless the function succeeds.

Parameters
[in]request- Complete 0x20-byte phase-one request.
[in]secure_tick- Complete current secure tick.
[out]response- Generated 0x80-byte client authentication packet.
[out]session_data- Generated 0x40-byte state to retain unchanged for phase two.
Returns
0 on success; 0x808A0200 for a NULL pointer; 0x808A0202 through 0x808A0205 for random/cryptographic failures; 0x808A0206 for a semaphore failure; or 0x808A0300 for an internal permission or console-identity failure.

Variable Documentation

◆ mode

SceUInt8 SceSblGcAuthMgrMlnpsnlAuth1Request::mode

Authentication mode used by the remote protocol.

◆ request_data

SceUInt8 SceSblGcAuthMgrMlnpsnlAuth1Request::request_data[0x1F]

Remaining authenticated request data.

◆ packet_type

SceUInt8 SceSblGcAuthMgrMlnpsnlAuth1Response::packet_type

Set to 0x20.

◆ phase

SceUInt8 SceSblGcAuthMgrMlnpsnlAuth1Response::phase

Set to 1.

◆ packet_size

SceUInt8 SceSblGcAuthMgrMlnpsnlAuth1Response::packet_size

Set to 0x80.

◆ reserved [1/2]

SceUInt8 SceSblGcAuthMgrMlnpsnlAuth1Response::reserved[0xD]

Set to zero.

◆ protected_data

SceUInt8 SceSblGcAuthMgrMlnpsnlAuth1Response::protected_data[0x60]

Protected phase-one authentication data.

◆ authentication_tag

SceUInt8 SceSblGcAuthMgrMlnpsnlAuth1Response::authentication_tag[0x10]

Packet authentication tag.

◆ session_key

SceUInt8 SceSblGcAuthMgrMlnpsnlSessionData::session_key[0x10]

Candidate key copied to the final output only after phase-two verification.

◆ binding_data

SceUInt8 SceSblGcAuthMgrMlnpsnlSessionData::binding_data[0x10]

Value used to bind the decrypted phase-two response to this session.

◆ phase_one_packet_size

SceUInt8 SceSblGcAuthMgrMlnpsnlSessionData::phase_one_packet_size

Set to 0x80 and required in the phase-two header.

◆ reserved [2/2]

SceUInt8 SceSblGcAuthMgrMlnpsnlSessionData::reserved[0x1F]

Set to zero.