1
0
Fork 0
mirror of https://github.com/DarkMatterCore/nxdumptool.git synced 2024-12-23 17:06:02 +00:00
nxdumptool/include/core
Pablo Curiel f79680184d Runtime key derivation with hardcoded key sources
* aes: add aes128EcbCrypt() as a one-shot function to perform AES-128-ECB crypto. The rest of the codebase now calls this function whenever suitable.

* fs_ext: add const keyword to IPC input structs wherever suitable.

* key_sources: add hardcoded master key vectors (prod, dev); master KEK sources (Erista, Mariko); master key source; ticket common key source; SMC key type sources; SMC seal key masks; AES key generation source; NCA header KEK source; NCA header key source and NCA KAEK sources. Also fixed the hardcoded gamecard CardInfo key source for dev units (it was previously generated using retail keydata, my bad).

* keys: remove keysGetNcaMainSignatureModulus(); remove keysDecryptNcaKeyAreaEntry(); repurpose keyset struct to only hold keys that can actually be used for the current hardware type; remove KeysGameCardKeyset; remove keysIsXXModulusYYMandatory() helpers; remove keysRetrieveKeysFromProgramMemory(); remove keysDeriveSealedNcaKeyAreaEncryptionKeys(); add keysDeriveMasterKeys() and keysDerivePerGenerationKeys(); rename keysDeriveGameCardKeys() -> keysDeriveGcCardInfoKey(); add small reimplementations of GenerateAesKek, LoadAesKey and GenerateAesKey; add keysLoadAesKeyFromAesKek() and keysGenerateAesKeyFromAesKek() wrappers. Furthermore, master key derivation is now carried out manually using hardcoded key sources and the last known master key, which is loaded from the Lockpick_RCM keys file -- if the last known master key is unavailable, the key derivation algorithm will then fallback to TSEC root key / Mariko KEK based key derivation, depending on the hardware type.

* nca: add hardcoded NCA man signature moduli (prod, dev); merge ncaDecryptKeyArea() and ncaEncryptKeyArea() into ncaKeyAreaCrypt().

* nxdt_utils: add utilsIsMarikoUnit(); remove _utilsAppletModeCheck(); rename utilsAppletModeCheck() -> utilsIsAppletMode().

* services: remove spl:mig dependency (yay).

* smc: add SmcKeyType enum; add SmcSealKey enum; add SmcGenerateAesKekOption struct; add smcPrepareGenerateAesKekOption().
2023-04-08 13:38:28 +02:00
..
aes.h Runtime key derivation with hardcoded key sources 2023-04-08 13:38:28 +02:00
bfttf.h Update copyright year. 2022-03-17 13:58:40 +01:00
bktr.h Many small changes (sorry, I need to push these). 2022-09-12 20:19:10 +02:00
cert.h Update copyright year. 2022-03-17 13:58:40 +01:00
cnmt.h Support for HOS 16.x changes. 2023-03-29 23:14:21 +02:00
config.h Many small changes (sorry, I need to push these). 2022-09-12 20:19:10 +02:00
elf_symbol.h Codebase cleanup. 2022-07-05 03:04:28 +02:00
es.h Update copyright year. 2022-03-17 13:58:40 +01:00
fs_ext.h Update copyright year. 2022-03-17 13:58:40 +01:00
gamecard.h gamecard: remove references to boot partition. 2022-03-18 20:23:11 +01:00
hfs.h Update copyright year. 2022-03-17 13:58:40 +01:00
http.h Update copyright year. 2022-03-17 13:58:40 +01:00
key_sources.h Runtime key derivation with hardcoded key sources 2023-04-08 13:38:28 +02:00
keys.h Runtime key derivation with hardcoded key sources 2023-04-08 13:38:28 +02:00
legal_info.h Fix some issues + update PoCs. 2022-07-05 01:25:28 +02:00
lz4.h Many small changes (sorry, I need to push these). 2022-09-12 20:19:10 +02:00
mem.h Update copyright year. 2022-03-17 13:58:40 +01:00
nacp.h Support for HOS 16.x changes. 2023-03-29 23:14:21 +02:00
nca.h Support for HOS 16.x changes. 2023-03-29 23:14:21 +02:00
nca_storage.h romfs: implement romfsIsFileEntryUpdated(). 2022-07-07 02:30:45 +02:00
npdm.h Support for HOS 16.x changes. 2023-03-29 23:14:21 +02:00
nso.h Update copyright year. 2022-03-17 13:58:40 +01:00
nxdt_bfsar.h Update copyright year. 2022-03-17 13:58:40 +01:00
nxdt_includes.h nca: fix ctx init for NCAs with bogus Patch RomFS. 2022-07-14 14:10:03 +02:00
nxdt_json.h Update copyright year. 2022-03-17 13:58:40 +01:00
nxdt_log.h Use verbosity-level-based log macros everywhere. 2022-07-12 18:34:49 +02:00
nxdt_utils.h Runtime key derivation with hardcoded key sources 2023-04-08 13:38:28 +02:00
pfs.h Many small changes (sorry, I need to push these). 2022-09-12 20:19:10 +02:00
program_info.h Codebase cleanup. 2022-07-05 03:04:28 +02:00
romfs.h Many small changes (sorry, I need to push these). 2022-09-12 20:19:10 +02:00
rsa.h Remove support for NPDM patching. 2022-06-26 03:34:31 +02:00
save.h Update copyright year. 2022-03-17 13:58:40 +01:00
service_guard.h Update copyright year. 2022-03-17 13:58:40 +01:00
services.h Update copyright year. 2022-03-17 13:58:40 +01:00
sha3.h Runtime key derivation with hardcoded key sources 2023-04-08 13:38:28 +02:00
signature.h Update copyright year. 2022-03-17 13:58:40 +01:00
smc.h Runtime key derivation with hardcoded key sources 2023-04-08 13:38:28 +02:00
tik.h Codebase cleanup. 2022-07-05 03:04:28 +02:00
title.h QoL changes. 2022-12-04 11:29:47 +01:00
ums.h Update copyright year. 2022-03-17 13:58:40 +01:00
usb.h Update copyright year. 2022-03-17 13:58:40 +01:00