nyx: Do not over decrypt pkg1 on t210b01

This commit is contained in:
CTCaer
2021-01-11 23:28:06 +02:00
parent 2370ca0a44
commit 7aa1e77642
3 changed files with 5 additions and 2 deletions

View File

@@ -94,8 +94,9 @@ int pkg1_decrypt(const pkg1_id_t *id, u8 *pkg1)
hdr = (pk11_hdr_t *)(pkg1 + id->pkg11_off + 0x20);
// Use BEK for T210B01.
// Additionally, skip 0x20 bytes from decryption to maintain the header.
se_aes_iv_clear(13);
se_aes_crypt_cbc(13, 0, pkg1 + 0x20, oem_hdr->size, pkg1 + 0x20, oem_hdr->size);
se_aes_crypt_cbc(13, 0, pkg1 + 0x20, oem_hdr->size - 0x20, pkg1 + 0x20, oem_hdr->size - 0x20);
}
// Return if header is valid.