SPL services: Difference between revisions

No edit summary
(S2) spl:ldn: Moved to the ldn page.
 
(3 intermediate revisions by 2 users not shown)
Line 93: Line 93:
Unofficial name.
Unofficial name.


Wrapper for [[SMC#GetConfig|GetConfig SMC]]. Some config is incomplete when accessed with [[#GetConfig|GetConfig]], this allows returning the full config.
Some config is incomplete when accessed with [[#GetConfig|GetConfig]], this allows returning the full config.


Takes an input u32 '''ConfigItem''' and an output type-0xA buffer.
Takes an input u32 '''ConfigItem''' and an output type-0xA buffer.
Line 503: Line 503:
| 5 || [[#GetConfigWithBuffer|GetConfigWithBuffer]]
| 5 || [[#GetConfigWithBuffer|GetConfigWithBuffer]]
|-
|-
| 7000 ||  
| 7000 || [[#GenerateNxAdvertiseKey|GenerateNxAdvertiseKey]]
|-
|-
| 7001 ||  
| 7001 || [[#GenerateNxSessionKey|GenerateNxSessionKey]]
|-
|-
| 7002 ||  
| 7002 || [[#GenerateNxLp2pKeyIndex1|GenerateNxLp2pKeyIndex1]]
|-
|-
| 7003 ||  
| 7003 || [[#GenerateNxLp2pKeyIndex2|GenerateNxLp2pKeyIndex2]]
|-
|-
| 7004 ||  
| 7004 || [[#GenerateOunceAdvertiseKey|GenerateOunceAdvertiseKey]]
|-
|-
| 7005 ||  
| 7005 || [[#GenerateOunceSessionKey|GenerateOunceSessionKey]]
|}
|}


The below 7000+ cmds take a KeySource (equivalent to NX-GenerateAesKey) and an u32. Bitmask 0x1F of the u32 is the Generation, 0x20 is valid but doesn't seem to do anything. Values >=0x21 throw error. A 0x10-byte outbuf is used for the output key. Cmd7004/Cmd7005 use a 0x20-byte outbuf. These are equivalent to GenerateAesKek+GenerateAesKey combined.
The below 7000+ cmds take a KeySource (equivalent to NX-GenerateAesKey) and an u32. Bitmask 0x1F of the u32 is the Generation, 0x20 is valid but doesn't seem to do anything. Values >=0x21 throw error. A 0x10-byte outbuf is used for the output key. Cmd7004/Cmd7005 use a 0x20-byte outbuf. These are equivalent to GenerateAesKek+GenerateAesKey combined.


Cmd7000-Cmd7003 use NX keys, while Cmd7004/Cmd7005 use Ounce keys.
With Nx commands, valid key generations match what's expected for S1. With Ounce commands, the valid key generations on 20.x are 0/1.


All of these use AES-ECB with the input KeySource, with the buffer as the output.
All of these use AES-ECB with the input KeySource, with the buffer as the output.


== Cmd7000 ==
== GenerateNxAdvertiseKey ==
Unofficial name.
 
Takes an input 16-byte '''KeySource''', an input u32, and an output type-0xA buffer '''AesKey'''.
Takes an input 16-byte '''KeySource''', an input u32, and an output type-0xA buffer '''AesKey'''.


Generates a key using the NX-equivalent of the ldn Kek-action_keysource.
Generates a key using the NX-equivalent of the ldn Kek-action_keysource.
 
== GenerateNxSessionKey ==
Unofficial name.


== Cmd7001 ==
Takes an input 16-byte '''KeySource''', an input u32, and an output type-0xA buffer '''AesKey'''.
Takes an input 16-byte '''KeySource''', an input u32, and an output type-0xA buffer '''AesKey'''.


Generates a key using the NX-equivalent of the ldn Kek-data_keysource.
Generates a key using the NX-equivalent of the ldn Kek-data_keysource.


== Cmd7002 ==
== GenerateNxLp2pKeyIndex1 ==
Unofficial name.
 
Takes an input 16-byte '''KeySource''', an input u32, and an output type-0xA buffer '''AesKey'''.
Takes an input 16-byte '''KeySource''', an input u32, and an output type-0xA buffer '''AesKey'''.


== Cmd7003 ==
Generates a key using the NX-equivalent of the lp2p Kek-Index1.
 
== GenerateNxLp2pKeyIndex2 ==
Unofficial name.
 
Takes an input 16-byte '''KeySource''', an input u32, and an output type-0xA buffer '''AesKey'''.
Takes an input 16-byte '''KeySource''', an input u32, and an output type-0xA buffer '''AesKey'''.


== Cmd7004 ==
Generates a key using the NX-equivalent of the lp2p Kek-Index2.
 
== GenerateOunceAdvertiseKey ==
Unofficial name.
 
Takes an input 32-byte '''KeySource''', an input u32, and an output type-0xA buffer '''AesKey'''.
Takes an input 32-byte '''KeySource''', an input u32, and an output type-0xA buffer '''AesKey'''.


Ounce version of Cmd7000. [[LDN_services|ldn]] only uses the first 0x10-bytes of the output key.
Ounce version of [[#GenerateNxAdvertiseKey|GenerateNxAdvertiseKey]].
 
== GenerateOunceSessionKey ==
Unofficial name.


== Cmd7005 ==
Takes an input 32-byte '''KeySource''', an input u32, and an output type-0xA buffer '''AesKey'''.
Takes an input 32-byte '''KeySource''', an input u32, and an output type-0xA buffer '''AesKey'''.


Ounce version of Cmd7001. [[LDN_services|ldn]] only uses the first 0x10-bytes of the output key.
Ounce version of [[#GenerateNxSessionKey|GenerateNxSessionKey]].


[[Category:Services]]
[[Category:Services]]