Difference between revisions of "Kprx auth sm"

From Vita Development Wiki
Jump to navigation Jump to search
 
(4 intermediate revisions by 2 users 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.
  
== functions ==
+
== Teardown ==
  
=== sceBigmacExec ===
+
After authentication, SELF Attributes and Capabilities are checked through a SWI 6 call to [[Secure Kernel|secure_kernel]].
 +
 
 +
== Functions ==
 +
 
 +
=== get_metainfo_ac_info ===
 +
 
 +
{| class="wikitable"
 +
|-
 +
! Version !! offset
 +
|-
 +
| 3.60 || 0x80eb8a
 +
|}
 +
 
 +
Check program-authority-id to get corresponding SELF Attribute and Capability.
 +
 
 +
{| class="wikitable"
 +
|+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 ===
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 13: 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);