mirror of
https://github.com/DarkMatterCore/nxdumptool.git
synced 2024-10-30 07:21:46 +00:00
f376eb6db4
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). |
||
---|---|---|
.. | ||
core | ||
tasks | ||
utils | ||
views | ||
main.cpp |