mirror of
https://github.com/CTCaer/hekate.git
synced 2024-12-24 12:14:11 +00:00
hos: Add PK21 decryption support for Mariko
This commit is contained in:
parent
9b3e9724b7
commit
8ef9f888f6
@ -1314,7 +1314,7 @@ pkg2_hdr_t *pkg2_decrypt(void *data, u8 kb)
|
|||||||
if ((kb >= KB_FIRMWARE_VERSION_810) && (kb < KB_FIRMWARE_VERSION_MAX))
|
if ((kb >= KB_FIRMWARE_VERSION_810) && (kb < KB_FIRMWARE_VERSION_MAX))
|
||||||
{
|
{
|
||||||
u8 tmp_mkey[0x10];
|
u8 tmp_mkey[0x10];
|
||||||
u8 decr_slot = !h_cfg.aes_slots_new ? 12 : 13; // Sept mkey.
|
u8 decr_slot = !h_cfg.t210b01 ? (!h_cfg.aes_slots_new ? 12 : 13) : 7; // Sept mkey or T210B01 mkey.
|
||||||
u8 mkey_seeds_cnt = sizeof(mkey_vector_8xx) / 0x10;
|
u8 mkey_seeds_cnt = sizeof(mkey_vector_8xx) / 0x10;
|
||||||
u8 mkey_seeds_idx = mkey_seeds_cnt; // Real index + 1.
|
u8 mkey_seeds_idx = mkey_seeds_cnt; // Real index + 1.
|
||||||
u8 mkey_seeds_min_idx = mkey_seeds_cnt - (KB_FIRMWARE_VERSION_MAX - kb);
|
u8 mkey_seeds_min_idx = mkey_seeds_cnt - (KB_FIRMWARE_VERSION_MAX - kb);
|
||||||
|
@ -159,7 +159,7 @@ pkg2_hdr_t *pkg2_decrypt(void *data, u8 kb)
|
|||||||
if ((kb >= KB_FIRMWARE_VERSION_810) && (kb < KB_FIRMWARE_VERSION_MAX))
|
if ((kb >= KB_FIRMWARE_VERSION_810) && (kb < KB_FIRMWARE_VERSION_MAX))
|
||||||
{
|
{
|
||||||
u8 tmp_mkey[0x10];
|
u8 tmp_mkey[0x10];
|
||||||
u8 decr_slot = !h_cfg.aes_slots_new ? 12 : 13; // Sept mkey.
|
u8 decr_slot = !h_cfg.t210b01 ? (!h_cfg.aes_slots_new ? 12 : 13) : 7; // Sept mkey or T210B01 mkey.
|
||||||
u8 mkey_seeds_cnt = sizeof(mkey_vector_8xx) / 0x10;
|
u8 mkey_seeds_cnt = sizeof(mkey_vector_8xx) / 0x10;
|
||||||
u8 mkey_seeds_idx = mkey_seeds_cnt; // Real index + 1.
|
u8 mkey_seeds_idx = mkey_seeds_cnt; // Real index + 1.
|
||||||
u8 mkey_seeds_min_idx = mkey_seeds_cnt - (KB_FIRMWARE_VERSION_MAX - kb);
|
u8 mkey_seeds_min_idx = mkey_seeds_cnt - (KB_FIRMWARE_VERSION_MAX - kb);
|
||||||
|
Loading…
Reference in New Issue
Block a user