Difference between revisions of "SPL services"
Jump to navigation
Jump to search
m |
|||
Line 6: | Line 6: | ||
| 0 || [[#GetConfig]] || wrapper for [[SMC#GetConfig|GetConfig]] | | 0 || [[#GetConfig]] || wrapper for [[SMC#GetConfig|GetConfig]] | ||
|- | |- | ||
− | | 1 || | + | | 1 || || user supplied modulus and exponent |
|- | |- | ||
− | | 2 || [[# | + | | 2 || [[#GenerateAesKek]] || wrapper for [[SMC#KeygenAndSealX|KeygenAndSealX]] |
|- | |- | ||
− | | 3 || | + | | 3 || || wrapper for [[SMC#SetKeyslotFromXY|SetKeyslotFromXY]] |
|- | |- | ||
− | | 4 || | + | | 4 || GenerateAesKey || decrypts 0x10 bytes using AES ECB, uses [[SMC#SetKeyslotFromXY|SetKeyslotFromXY]] with a fixed Y |
|- | |- | ||
| 5 || [[#SetConfig]] || wrapper for [[SMC#SetConfig|SetConfig]] | | 5 || [[#SetConfig]] || wrapper for [[SMC#SetConfig|SetConfig]] | ||
|- | |- | ||
− | | 7 || | + | | 7 || GetRandom || uses [[SMC#PrngX931|PrngX931]] |
|- | |- | ||
− | | 9 || | + | | 9 || || wrapper for [[SMC#ImportParamsForFWithXY|ImportParamsForFWithXY]] |
|- | |- | ||
− | | 10 || | + | | 10 || || wrapper for [[SMC#ExpMod|ExpMod]] |
|- | |- | ||
| 11 || [[#IsDevUnit]] || uses [[SMC#GetConfig|GetConfig]] | | 11 || [[#IsDevUnit]] || uses [[SMC#GetConfig|GetConfig]] | ||
|- | |- | ||
− | | 12 || | + | | 12 || GenerateSpecificAesKey || wrapper for [[SMC#KeygenA|KeygenA]] |
|- | |- | ||
| 13 || [[#DecryptExpModParamsWithXY]] || wrapper for [[SMC#DecryptExpModParamsWithXY|DecryptExpModParamsWithXY]] | | 13 || [[#DecryptExpModParamsWithXY]] || wrapper for [[SMC#DecryptExpModParamsWithXY|DecryptExpModParamsWithXY]] | ||
|- | |- | ||
− | | 14 || | + | | 14 || || decrypts 0x10 bytes using AES ECB, uses [[SMC#SetKeyslotFromXY|SetKeyslotFromXY]] with fixed X and Y |
|- | |- | ||
− | | 15 || | + | | 15 || || wrapper for [[SMC#SymmetricCrypto|SymmetricCrypto]] |
|- | |- | ||
− | | 16 || | + | | 16 || || wrapper for [[SMC#CMAC|CMAC]] |
|- | |- | ||
− | | 17 || | + | | 17 || || wrapper for [[SMC#ImportParamsFor10WithXY|ImportParamsFor10WithXY]] |
|- | |- | ||
− | | 18 || | + | | 18 || || wrapper for [[SMC#ExpModAndKeygenAndSealZ|ExpModAndKeygenAndSealZ]] |
|- | |- | ||
− | | 19 || | + | | 19 || || wrapper for [[SMC#SetKeyslotFromZ|SetKeyslotFromZ]] |
|- | |- | ||
− | | 20 || | + | | 20 || || wrapper for [[SMC#KeygenAndSealZ|KeygenAndSealZ]] |
|- | |- | ||
| 21 || || | | 21 || || | ||
Line 79: | Line 79: | ||
[[Loader services|RO]] checks id11, if set then skipping NRR rsa signatures is allowed. | [[Loader services|RO]] checks id11, if set then skipping NRR rsa signatures is allowed. | ||
− | == | + | == GenerateAesKek == |
Takes 16-bytes as input and two u32s. Outputs random-looking 16-bytes. | Takes 16-bytes as input and two u32s. Outputs random-looking 16-bytes. | ||
Revision as of 22:51, 20 July 2017
spl:
Cmd | Name | Notes |
---|---|---|
0 | #GetConfig | wrapper for GetConfig |
1 | user supplied modulus and exponent | |
2 | #GenerateAesKek | wrapper for KeygenAndSealX |
3 | wrapper for SetKeyslotFromXY | |
4 | GenerateAesKey | decrypts 0x10 bytes using AES ECB, uses SetKeyslotFromXY with a fixed Y |
5 | #SetConfig | wrapper for SetConfig |
7 | GetRandom | uses PrngX931 |
9 | wrapper for ImportParamsForFWithXY | |
10 | wrapper for ExpMod | |
11 | #IsDevUnit | uses GetConfig |
12 | GenerateSpecificAesKey | wrapper for KeygenA |
13 | #DecryptExpModParamsWithXY | wrapper for DecryptExpModParamsWithXY |
14 | decrypts 0x10 bytes using AES ECB, uses SetKeyslotFromXY with fixed X and Y | |
15 | wrapper for SymmetricCrypto | |
16 | wrapper for CMAC | |
17 | wrapper for ImportParamsFor10WithXY | |
18 | wrapper for ExpModAndKeygenAndSealZ | |
19 | wrapper for SetKeyslotFromZ | |
20 | wrapper for KeygenAndSealZ | |
21 | ||
22 | ||
23 | GetSplWaitEvent |
GetConfig
Takes an input word (ConfigItem), and returns a u64 with the config params.
ConfigItem | Name |
---|---|
1 | DisableProgramVerification |
2 | MemoryConfiguration |
5 | HardwareType (0=Icosa, 1=Copper) |
7 | IsRecoveryBoot |
8 | DeviceId (byte7 clear). |
9 | BootReason |
10 | MemoryArrange |
11 | AllowSkippingNrrSignatures |
13 | BatteryProfile? |
Output from this when used by NIM must match the set:cal DeviceId with byte7 cleared, otherwise NIM will panic.
RO checks id11, if set then skipping NRR rsa signatures is allowed.
GenerateAesKek
Takes 16-bytes as input and two u32s. Outputs random-looking 16-bytes.
Same input gives same output. Output changes when system is rebooted.
SetConfig
Takes two input words, a ConfigItem and the value to set.
ConfigItem | Name |
---|---|
13 | Battery profile? |
IsDevUnit
No input params.
Returns an u8 flag for whether the system is devunit. Output flag is 0 on retail.
DecryptExpModParamsWithXY
Last SPL cmd used by SSL-sysmodule for TLS client-privk.