Difference between revisions of "Kprx auth sm"

From Vita Development Wiki
Jump to navigation Jump to search
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
Security module that authenticates and decrypts signed elf.
+
Kernel PRX Authentication Security Module. kprx_auth_sm authenticates and decrypts SELF files.
  
 
== Teardown ==
 
== Teardown ==
  
kprx_auth_sm only authenticates and decrypts modules. Attr and caps checks call [[Secure Kernel|secure_kernel]] from swi 6 at the end of authentication.
+
After authentication, SELF Attributes and Capabilities are checked through a SWI 6 call to [[Secure Kernel|secure_kernel]].
  
== functions ==
+
== Functions ==
  
 
=== get_metainfo_ac_info ===
 
=== get_metainfo_ac_info ===
Line 16: Line 16:
 
|}
 
|}
  
check fself authid to get corresponding privileged attr/caps.
+
Check program-authority-id to get corresponding SELF Attribute and Capability.
  
 
{| class="wikitable"
 
{| class="wikitable"
|+Supported authid
+
|+Supported program-authority-id
 
|-
 
|-
! Privileged !! Authid
+
! Privileged !! program-authority-id
 
|-
 
|-
 
| Game || 0x2F00000000000001
 
| Game || 0x2F00000000000001
Line 28: Line 28:
 
|}
 
|}
  
Attempting to start fself with an unsupported authid eventually causes the system to get error code 0x800f0616.
+
Attempting to start a fSELF with an unsupported program-authority-id eventually causes the system to throw error code 0x800f0616.
  
This function itself returns error code 0x800f0624 for unsupported authid.
+
Returns error code 0x800f0624 for unsupported program-authority-id.
  
=== sceBigmacExec ===
+
=== bigmac_exec ===
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 42: Line 42:
  
 
<source lang="C">
 
<source lang="C">
 
+
typedef struct bigmac_exec_option {
typedef struct SceBigmacExecOption {
 
 
int channel;
 
int channel;
 
int flags; // masked by 0xFFFFFCC0
 
int flags; // masked by 0xFFFFFCC0
} SceBigmacExecOption;
+
} bigmac_exec_option;
  
 
/*
 
/*
  * key      - If option->flags not seted 0x80, pass to bigmac keyslot
+
  * key      - If option->flags not seted 0x80, pass to bigmac keyring
 
  * key_size - 0:1:2:3, 64:128:192:256
 
  * key_size - 0:1:2:3, 64:128:192:256
 
  */
 
  */
int sceBigmacExec(void *dst, const void *src, int size, const void *key, void *iv, int first_algo, int second_algo, int key_size, const SceBigmacExecOption *option);
+
int bigmac_exec(void *dst, const void *src, int size, const void *key, void *iv, int first_algo, int second_algo, int key_size, const bigmac_exec_option *pOpt);
 
</source>
 
</source>
 +
 +
[[Category:Cmep]]
 +
[[Category:Library]]

Latest revision as of 21:57, 1 May 2023

Kernel PRX Authentication Security Module. kprx_auth_sm authenticates and decrypts SELF files.

Teardown

After authentication, SELF Attributes and Capabilities are checked through a SWI 6 call to secure_kernel.

Functions

get_metainfo_ac_info

Version offset
3.60 0x80eb8a

Check program-authority-id to get corresponding SELF Attribute and Capability.

Supported program-authority-id
Privileged program-authority-id
Game 0x2F00000000000001
Non-Game 0x2F00000000000002

Attempting to start a fSELF with an unsupported program-authority-id eventually causes the system to throw error code 0x800f0616.

Returns error code 0x800f0624 for unsupported program-authority-id.

bigmac_exec

Version offset
3.60 0x80EF46
typedef struct bigmac_exec_option {
	int channel;
	int flags; // masked by 0xFFFFFCC0
} bigmac_exec_option;

/*
 * key      - If option->flags not seted 0x80, pass to bigmac keyring
 * key_size - 0:1:2:3, 64:128:192:256
 */
int bigmac_exec(void *dst, const void *src, int size, const void *key, void *iv, int first_algo, int second_algo, int key_size, const bigmac_exec_option *pOpt);