core/ncch: Add back secondary key derivation from Citra

Along with RomFS CTR, etc.
This commit is contained in:
zhupengfei
2020-04-30 20:03:54 +08:00
parent f0de8da515
commit b5b2fa32cb
4 changed files with 101 additions and 7 deletions
+3
View File
@@ -273,14 +273,17 @@ private:
bool has_header = false;
bool has_exheader = false;
bool has_exefs = false;
bool has_romfs = false;
bool is_loaded = false;
bool is_encrypted = false;
// for decrypting exheader, exefs header and icon/banner section
std::array<u8, 16> primary_key{};
std::array<u8, 16> secondary_key{}; // for decrypting romfs and .code section
std::array<u8, 16> exheader_ctr{};
std::array<u8, 16> exefs_ctr{};
std::array<u8, 16> romfs_ctr{};
u32 exefs_offset = 0;