Changes

Jump to navigation Jump to search
321 bytes added ,  18:44, 12 May 2020
no edit summary
== GenerateRandomBytes ==
Takes an output type-0xA buffer and fills it with random data from [[SMC#GetRandomBytesGenerateRandomBytes|GetRandomBytes GenerateRandomBytes SMC]]. Same command for "spl:" and "csrng" services, except for buffer-type.
= spl: =
| 0 || [[#GetConfig]]
|-
| 1 || [[#ExpModModularExponentiate]]
|-
| 5 || [[#SetConfig]]
Takes an input u32 '''ConfigItem'''. Returns one or more output u64s '''ConfigValue'''.
== ExpMod ModularExponentiate ==Wrapper for [[SMC#ExpModModularExponentiate|ExpMod ModularExponentiate SMC]].
Takes an output type-0xA buffer '''DataOut''' and 3 input type-0x9 buffers '''DataIn''', '''ExpIn''' and '''ModIn'''.
== ImportLotusKey ==
Wrapper for [[SMC#ImportLotusKeyDecryptAndImportLotusKey|ImportLotusKey DecryptAndImportLotusKey SMC]].
Takes an input type-0x9 buffer '''DataIn''', an input 16-byte '''AccessKey''', an input 16-byte '''KeySource''' and an input u32 '''Version''' (0 for normal keys or 1 for extended keys).
Decrypts '''DataIn''' with a key generated from '''AccessKey''' and '''KeySource''' and imports it for later usage.
[5.0.0+] The '''Version''' argument was removed and this now calls the [[SMC#ReEncryptRsaPrivateKeyReencryptDeviceUniqueData|ReEncryptRsaPrivateKey ReencryptDeviceUniqueData SMC]] instead.
== DecryptLotusMessage ==
Takes 3 input type-0x9 buffers '''DataIn''', '''ModIn''' and '''LabelHashIn'''.
Uses the [[SMC#SecureExpModModularExponentiateByStorageKey|SecureExpMod ModularExponentiateByStorageKey SMC]] to decrypt '''DataIn''' using the private key imported with [[#ImportLotusKey]] and the supplied '''ModIn''' and '''LabelHashIn'''.
== IsDevelopment ==
Takes an input 16-byte '''KeySource''' and two input u32s '''Generation''' and '''Option'''. Returns an output 16-byte '''AesKey'''.
== DecryptRsaPrivateKey DecryptDeviceUniqueData ==Wrapper for [[SMC#DecryptRsaPrivateKeyDecryptDeviceUniqueData|DecryptRsaPrivateKey DecryptDeviceUniqueData SMC]].
Takes an output type-0xA buffer '''DataOut''', an input type-0x9 '''DataIn''', an input 16-byte '''AccessKey''', an input 16-byte '''KeySource''' and an input u32 '''Version''' (0 for normal keys or 1 for extended keys).
Used by [[SSL_services|SSL]] for TLS client-privk.
[5.0.0+] The '''Version''' argument was removed and this now calls [[SMC#DecryptOrImportRsaPrivateKey|DecryptOrImportRsaPrivateKey SMC]] instead.
== DecryptAesKey ==
== ImportEsKey ==
Wrapper for [[SMC#ImportEsKeyDecryptAndImportEsDeviceKey|ImportEsKey DecryptAndImportEsDeviceKey SMC]].
Takes an input type-0x9 buffer '''DataIn''', an input 16-byte '''AccessKey''', an input 16-byte '''KeySource''' and an input u32 '''Version''' (0 for normal keys or 1 for extended keys).
Decrypts '''DataIn''' with a key generated from '''AccessKey''' and '''KeySource''' and imports it for later usage.
[5.0.0+] The '''Version''' argument was removed and this now calls the [[SMC#ReEncryptRsaPrivateKeyReencryptDeviceUniqueData|ReEncryptRsaPrivateKey ReencryptDeviceUniqueData SMC]] instead.
== UnwrapTitleKey ==
Wrapper for [[SMC#UnwrapTitleKeyPrepareEsDeviceUniqueKey|UnwrapTitleKey PrepareEsDeviceUniqueKey SMC]].
Takes an output type-0xA buffer '''DataOut''' and 3 input type-0x9 buffers '''DataIn''', '''ModIn''' and '''LabelHashIn'''. Returns an output u32 '''DataOutSize'''.
== LoadTitleKey ==
Wrapper for [[SMC#LoadTitleKeyLoadPreparedAesKey|LoadTitleKey LoadPreparedAesKey SMC]].
Takes an input u32 '''Keyslot''' and an input 16-byte '''AccessKey'''.
== UnwrapCommonTitleKey ==
Wrapper for [[SMC#UnwrapCommonTitleKeyPrepareEsCommonKey|UnwrapCommonTitleKey PrepareEsCommonKey SMC]].
Takes an input 16-byte '''KeySource'''. Returns an output 16-byte '''AccessKey'''.
Returns error 0xD01A if all keyslots are taken.
== FreeAesKeyslot DeallocateAesKeySlot ==
Takes an input u32 '''Keyslot'''.
[4.0.0+] Returns 0xD61A if a value has not previously been set and unsets the value after getting it.
== LoadElicenseKey LoadPreparedAesKey ==
Same as [[#LoadTitleKey|LoadTitleKey]].
| 0 || [[#GetConfig]]
|-
| 1 || [[#ExpModModularExponentiate]]
|-
| 5 || [[#SetConfig]]
| 21 || [2.0.0+] [[#AllocateAesKeyslot]]
|-
| 22 || [2.0.0+] [[#FreeAesKeyslotDeallocateAesKeySlot]]
|-
| 23 || [2.0.0+] [[#GetAesKeyslotAvailableEvent]]
| 0 || [[#GetConfig]]
|-
| 1 || [[#ExpModModularExponentiate]]
|-
| 5 || [[#SetConfig]]
| 21 || [2.0.0+] [[#AllocateAesKeyslot]]
|-
| 22 || [2.0.0+] [[#FreeAesKeyslotDeallocateAesKeySlot]]
|-
| 23 || [2.0.0+] [[#GetAesKeyslotAvailableEvent]]
| 0 || [[#GetConfig]]
|-
| 1 || [[#ExpModModularExponentiate]]
|-
| 5 || [[#SetConfig]]
| 21 || [2.0.0+] [[#AllocateAesKeyslot]]
|-
| 22 || [2.0.0+] [[#FreeAesKeyslotDeallocateAesKeySlot]]
|-
| 23 || [2.0.0+] [[#GetAesKeyslotAvailableEvent]]
|-
| 13 || [[#DecryptRsaPrivateKeyDecryptDeviceUniqueData]]
|-
| 26 || [5.0.0+] ImportSslKeyDecryptAndStoreSslClientCertKey
|-
| 27 || [5.0.0+] SslExpModModularExponentiateWithSslClientCertKey
|}
| 0 || [[#GetConfig]]
|-
| 1 || [[#ExpModModularExponentiate]]
|-
| 5 || [[#SetConfig]]
| 21 || [2.0.0+] [[#AllocateAesKeyslot]]
|-
| 22 || [2.0.0+] [[#FreeAesKeyslotDeallocateAesKeySlot]]
|-
| 23 || [2.0.0+] [[#GetAesKeyslotAvailableEvent]]
|-
| 13 || [[#DecryptRsaPrivateKeyDecryptDeviceUniqueData]]
|-
| 17 || [[#ImportEsKey]]
| 18 || [[#UnwrapTitleKey]]
|-
| 20 || [2.0.0+] [[#UnwrapCommonTitleKeyPrepareEsCommonKey]]
|-
| 28 || [5.0.0+] ImportDrmKeyDecryptAndStoreDrmDeviceCertKey
|-
| 29 || [5.0.0+] DrmExpModModularExponentiateWithDrmDeviceCertKey
|-
| 31 || [6.0.0+] UnwrapElicenseKeyPrepareEsArchiveKey
|-
| 32 || [6.0.0+] [[#LoadElicenseKeyLoadPreparedAesKey]]
|}
| 0 || [[#GetConfig]]
|-
| 1 || [[#ExpModModularExponentiate]]
|-
| 5 || [[#SetConfig]]
| 21 || [2.0.0+] [[#AllocateAesKeyslot]]
|-
| 22 || [2.0.0+] [[#FreeAesKeyslotDeallocateAesKeySlot]]
|-
| 23 || [2.0.0+] [[#GetAesKeyslotAvailableEvent]]
|-
| 13 || [[#DecryptRsaPrivateKeyDecryptDeviceUniqueData]]
|-
| 30 || [5.0.0+] ReEncryptRsaPrivateKeyReencryptDeviceUniqueData
|}
[[Category:Services]]

Navigation menu