mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2024-11-14 10:49:41 +01:00
tsec_root_keys starts counting at 0, not 6
This commit is contained in:
parent
8d1c5449d1
commit
01b14c6476
2 changed files with 4 additions and 6 deletions
|
@ -24,7 +24,7 @@ namespace LibHac.Nand
|
|||
GuidPartitionInfo[] partitions = disc.Partitions.Select(x => (GuidPartitionInfo)x).ToArray();
|
||||
ProdInfo = partitions.FirstOrDefault(x => x.Name == "PRODINFO");
|
||||
ProdInfoF = partitions.FirstOrDefault(x => x.Name == "PRODINFOF");
|
||||
Package2 = new GuidPartitionInfo[]
|
||||
Package2 = new[]
|
||||
{
|
||||
partitions.FirstOrDefault(x => x.Name == "BCPKG2-1-Normal-Main"),
|
||||
partitions.FirstOrDefault(x => x.Name == "BCPKG2-2-Normal-Sub"),
|
||||
|
|
|
@ -213,9 +213,9 @@ namespace LibHac
|
|||
{
|
||||
for (int i = UsedKeyblobCount; i < 0x20; i++)
|
||||
{
|
||||
if (TsecRootKeys[i].IsEmpty() || MasterKekSources[i].IsEmpty()) continue;
|
||||
if (TsecRootKeys[i - UsedKeyblobCount].IsEmpty() || MasterKekSources[i].IsEmpty()) continue;
|
||||
|
||||
Crypto.DecryptEcb(TsecRootKeys[i], MasterKekSources[i], MasterKeks[i], 0x10);
|
||||
Crypto.DecryptEcb(TsecRootKeys[i - UsedKeyblobCount], MasterKekSources[i], MasterKeks[i], 0x10);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -570,9 +570,7 @@ namespace LibHac
|
|||
new KeyValue("ssl_rsa_kek", 0x10, 120, set => set.SslRsaKek),
|
||||
new KeyValue("xci_header_key", 0x10, 130, set => set.XciHeaderKey),
|
||||
|
||||
new KeyValue("header_key", 0x20, 220, set => set.HeaderKey),
|
||||
|
||||
new KeyValue("tsec_root_key", 0x10, -1, set => set.TsecRootKeys[6])
|
||||
new KeyValue("header_key", 0x20, 220, set => set.HeaderKey)
|
||||
};
|
||||
|
||||
for (int slot = 0; slot < 0x20; slot++)
|
||||
|
|
Loading…
Reference in a new issue