1
0
Fork 0
mirror of https://github.com/DarkMatterCore/nxdumptool.git synced 2024-12-27 19:06:01 +00:00
nxdumptool/include/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.h [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
bfttf.h [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
bktr.h [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
cert.h [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
cnmt.h [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
config.h Remove all references to NSWDB. 2024-05-02 15:38:39 +02:00
elf_symbol.h [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
es.h [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
fs_ext.h Some updates 2024-08-06 22:57:54 +02:00
gamecard.h codebase: support HOS 19.0.0. 2024-10-10 13:14:01 +02:00
hfs.h [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
hos_version_structs.h Improve directory layout while we still can. 2024-04-30 23:01:42 +02:00
http.h [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
key_sources.h keys: relax mkey requirements on older firmwares. 2024-10-12 20:38:33 +02:00
keys.h [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
legal_info.h [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
lz4.h Some updates 2024-08-06 22:57:54 +02:00
mem.h nso: update read logic 2024-08-08 12:27:54 +02:00
nacp.h [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
nca.h codebase: support HOS 19.0.0. 2024-10-10 13:14:01 +02:00
nca_storage.h [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
npdm.h codebase: support HOS 19.0.0. 2024-10-10 13:14:01 +02:00
nso.h nso: update read logic 2024-08-08 12:27:54 +02:00
nxdt_bfsar.h [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
nxdt_includes.h Upgrade C standard to C23. 2024-10-08 00:58:45 +02:00
nxdt_json.h [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
nxdt_log.h FileWriter: remove call to ftruncate() 2024-05-03 15:14:32 +02:00
nxdt_utils.h utils: add emuMMC detection 2024-10-08 01:09:46 +02:00
pfs.h pfs: change name table padding handling 2024-08-26 10:06:17 +02:00
program_info.h [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
romfs.h [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
rsa.h [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
save.h [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
service_guard.h [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
services.h [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
sha3.h [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
signature.h [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
smc.h [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
tik.h [skip ci] Update copyright year. 2024-04-12 11:49:03 +02:00
title.h Uses a dynamically allocated buffer to hold the CSV data, which can then be written to an output file. 2024-08-24 20:10:16 +02:00
ums.h Add DataTransferTaskFrame and GameCardImageDumpTaskFrame classes 2024-04-29 15:26:12 +02:00
usb.h [ci skip] Add GameCardImageDumpTask and FileWriter classes 2024-04-25 01:49:04 +02:00