hos: Support new sept/exo keyslots

This commit is contained in:
CTCaer
2020-06-14 13:53:21 +03:00
parent f7f99bddab
commit d607a8830b
8 changed files with 105 additions and 47 deletions

View File

@@ -1296,7 +1296,7 @@ pkg2_hdr_t *pkg2_decrypt(void *data, u8 kb)
if ((kb >= KB_FIRMWARE_VERSION_810) && (kb < KB_FIRMWARE_VERSION_MAX))
{
u8 tmp_mkey[0x10];
u8 decr_slot = 12; // Sept mkey.
u8 decr_slot = !h_cfg.aes_slots_new ? 12 : 13; // Sept mkey.
u8 mkey_seeds_cnt = sizeof(mkey_vector_8xx) / 0x10;
u8 mkey_seeds_idx = mkey_seeds_cnt; // Real index + 1.
u8 mkey_seeds_min_idx = mkey_seeds_cnt - (KB_FIRMWARE_VERSION_MAX - kb);
@@ -1327,7 +1327,7 @@ pkg2_hdr_t *pkg2_decrypt(void *data, u8 kb)
{
mkey_seeds_cnt--;
mkey_seeds_idx = mkey_seeds_cnt;
decr_slot = 12; // Sept mkey.
decr_slot = !h_cfg.aes_slots_new ? 12 : 13; // Sept mkey.
}
// Out of keys. pkg2 is latest or process failed.