1
0
Fork 0
mirror of https://github.com/DarkMatterCore/nxdumptool.git synced 2024-10-18 03:11:45 +01:00
nxdumptool/source/core
Pablo Curiel f376eb6db4 keys: relax mkey requirements on older firmwares.
A hardcoded table with HOS version numbers and master key indexes is now used to determine the HOS key generation at runtime, whenever possible. This allows the application to more accurately determine the key generation that's actually required by the console it's running on.

Most parts of the code that relied on the Atmosphère key generation value have been updated to use the HOS key generation value instead. If the HOS version is too high/unknown, the code will fallback to the Atmosphère key generation value.

Furthermore, if the HOS key generation value is lower than our last known key generation, the code will now try to look for the highest available master key it can use to derive all lower master keys, beginning with the last known master key and ending with the master key that matches the HOS key generation value. Previous behavior only checked the availability of the master key that matched the Atmosphère key generation, which isn't completely reliable nor accurate.

If this process fails, current master key derivation will be carried out as a last resort, which wasn't being done either under this specific scenario.

Other changes include:

* keys: add keysGetHorizonOsKeyGeneration().
* keys: move current master key derivation logic into its own function, keysDeriveCurrentMasterKey(), which is now used if both Atmosphère and HOS and up-to-date, or if a lower master key is required (as a last resort method).
2024-10-12 20:38:33 +02:00
..
devoptab Improve directory layout while we still can. 2024-04-30 23:01:42 +02:00
fatfs Improve directory layout while we still can. 2024-04-30 23:01:42 +02:00
aes.c Improve directory layout while we still can. 2024-04-30 23:01:42 +02:00
bfttf.c title: init gc title storage by HFS as fallback 2024-08-18 15:29:57 +02:00
bktr.c Improve directory layout while we still can. 2024-04-30 23:01:42 +02:00
cert.c Improve directory layout while we still can. 2024-04-30 23:01:42 +02:00
cnmt.c nca: fix impl issues in ncaInitializeContextCommon() 2024-08-12 12:10:34 +02:00
config.c Remove all references to NSWDB. 2024-05-02 15:38:39 +02:00
es.c Improve directory layout while we still can. 2024-04-30 23:01:42 +02:00
fs_ext.c Improve directory layout while we still can. 2024-04-30 23:01:42 +02:00
gamecard.c gamecard: add proper validation of root HFS partition headers in Terra gamecards 2024-05-20 23:06:36 +02:00
hfs.c Improve directory layout while we still can. 2024-04-30 23:01:42 +02:00
http.c Improve directory layout while we still can. 2024-04-30 23:01:42 +02:00
keys.c keys: relax mkey requirements on older firmwares. 2024-10-12 20:38:33 +02:00
legal_info.c Improve directory layout while we still can. 2024-04-30 23:01:42 +02:00
lz4.c Some updates 2024-08-06 22:57:54 +02:00
mem.c Improve directory layout while we still can. 2024-04-30 23:01:42 +02:00
nacp.c Improve directory layout while we still can. 2024-04-30 23:01:42 +02:00
nca.c nca: fix impl issues in ncaInitializeContextCommon() 2024-08-12 12:10:34 +02:00
nca_storage.c Improve directory layout while we still can. 2024-04-30 23:01:42 +02:00
npdm.c Improve directory layout while we still can. 2024-04-30 23:01:42 +02:00
nso.c title: pre-generate gamecard filenames 2024-08-11 12:59:22 +02:00
nxdt_bfsar.c title: init gc title storage by HFS as fallback 2024-08-18 15:29:57 +02:00
nxdt_json.c Upgrade C standard to C23. 2024-10-08 00:58:45 +02:00
nxdt_log.c nca: fix impl issues in ncaInitializeContextCommon() 2024-08-12 12:10:34 +02:00
nxdt_utils.c keys: relax mkey requirements on older firmwares. 2024-10-12 20:38:33 +02:00
pfs.c pfs: change name table padding handling 2024-08-26 10:06:17 +02:00
program_info.c Improve directory layout while we still can. 2024-04-30 23:01:42 +02:00
romfs.c Improve directory layout while we still can. 2024-04-30 23:01:42 +02:00
rsa.c Improve directory layout while we still can. 2024-04-30 23:01:42 +02:00
save.c Improve directory layout while we still can. 2024-04-30 23:01:42 +02:00
services.c Improve directory layout while we still can. 2024-04-30 23:01:42 +02:00
sha3.c Improve directory layout while we still can. 2024-04-30 23:01:42 +02:00
tik.c Improve directory layout while we still can. 2024-04-30 23:01:42 +02:00
title.c title: update internal system title list 2024-10-08 01:15:16 +02:00
ums.c Improve directory layout while we still can. 2024-04-30 23:01:42 +02:00
usb.c Improve directory layout while we still can. 2024-04-30 23:01:42 +02:00