From 655fed169a149e82092960f255cd3abd7787d17b Mon Sep 17 00:00:00 2001 From: Alex Barney Date: Thu, 12 Oct 2023 22:24:16 -0700 Subject: [PATCH] Add key sources for 17.0.0 --- build/CodeGen/IncludedKeys.txt | 3 +++ src/LibHac/Common/Keys/KeyDerivation.cs | 2 ++ src/LibHac/Common/Utilities.cs | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/build/CodeGen/IncludedKeys.txt b/build/CodeGen/IncludedKeys.txt index d06c7935..f01d372f 100644 --- a/build/CodeGen/IncludedKeys.txt +++ b/build/CodeGen/IncludedKeys.txt @@ -20,6 +20,7 @@ master_kek_source_0c = 683BCA54B86F9248C305768788707923 master_kek_source_0d = F013379AD56351C3B49635BC9CE87681 master_kek_source_0e = 6E7786AC830A8D3E7DB766A022B76E67 master_kek_source_0f = 99220957A7F95E94FE787F41D6E756E6 +master_kek_source_10 = 71B9A6C0FF976B0CB440B9D5815D8190 mariko_master_kek_source_05 = 77605AD2EE6EF83C3F72E2599DAC5E56 mariko_master_kek_source_06 = 1E80B8173EC060AA11BE1A4AA66FE4AE @@ -32,6 +33,7 @@ mariko_master_kek_source_0c = 52719BDFA78B61D8D58511E48E4F74C6 mariko_master_kek_source_0d = D268C6539D94F9A8A5A8A7C88F534B7A mariko_master_kek_source_0e = EC61BC821E0F5AC32B643F9DD619222D mariko_master_kek_source_0f = A5EC16391A3016082ECF096F5E7CEEA9 +mariko_master_kek_source_10 = 8DEE9E11363A9B0A6AC7BBE9D103F780 mariko_master_kek_source_dev_05 = 32C0976B636D4464F23AA5C0DE46CCE9 mariko_master_kek_source_dev_06 = CC974C462A0CB0A6C9C0B7BE302EC368 @@ -44,6 +46,7 @@ mariko_master_kek_source_dev_0c = 4D5AB2C9E9E44EA4D3BF94123630D07F mariko_master_kek_source_dev_0d = EC5EB511D5431E6A4E546FD4D322CE87 mariko_master_kek_source_dev_0e = 18A56FEF721162C51A14F18C218327B7 mariko_master_kek_source_dev_0f = 3A9CF0397023F6AF714460F46DEDA1D6 +mariko_master_kek_source_dev_10 = 43DB9D88DB38E9BF3DD78339EFB14FA7 master_key_source = D8A2410AC6C59001C61D6A267C513F3C diff --git a/src/LibHac/Common/Keys/KeyDerivation.cs b/src/LibHac/Common/Keys/KeyDerivation.cs index 8a87b35d..588aeb20 100644 --- a/src/LibHac/Common/Keys/KeyDerivation.cs +++ b/src/LibHac/Common/Keys/KeyDerivation.cs @@ -310,6 +310,7 @@ internal static class KeyDerivation 0x08, 0xE0, 0xF4, 0xBE, 0xAA, 0x6E, 0x5A, 0xC3, 0xA6, 0xBC, 0xFE, 0xB9, 0xE2, 0xA3, 0x24, 0x12, // Master key 0C encrypted with Master key 0D. 0xD6, 0x80, 0x98, 0xC0, 0xFA, 0xC7, 0x13, 0xCB, 0x93, 0xD2, 0x0B, 0x82, 0x4C, 0xA1, 0x7B, 0x8D, // Master key 0D encrypted with Master key 0E. 0x78, 0x66, 0x19, 0xBD, 0x86, 0xE7, 0xC1, 0x09, 0x9B, 0x6F, 0x92, 0xB2, 0x58, 0x7D, 0xCF, 0x26, // Master key 0E encrypted with Master key 0F. + 0x39, 0x1E, 0x7E, 0xF8, 0x7E, 0x73, 0xEA, 0x6F, 0xAF, 0x00, 0x3A, 0xB4, 0xAA, 0xB8, 0xB7, 0x59, // Master key 0F encrypted with Master key 10. }; private static ReadOnlySpan MasterKeyVectorsProd => new byte[] @@ -330,6 +331,7 @@ internal static class KeyDerivation 0x83, 0x67, 0xAF, 0x01, 0xCF, 0x93, 0xA1, 0xAB, 0x80, 0x45, 0xF7, 0x3F, 0x72, 0xFD, 0x3B, 0x38, // Master key 0C encrypted with Master key 0D. 0xB1, 0x81, 0xA6, 0x0D, 0x72, 0xC7, 0xEE, 0x15, 0x21, 0xF3, 0xC0, 0xB5, 0x6B, 0x61, 0x6D, 0xE7, // Master key 0D encrypted with Master key 0E. 0xAF, 0x11, 0x4C, 0x67, 0x17, 0x7A, 0x52, 0x43, 0xF7, 0x70, 0x2F, 0xC7, 0xEF, 0x81, 0x72, 0x16, // Master key 0E encrypted with Master key 0F. + 0x25, 0x12, 0x8B, 0xCB, 0xB5, 0x46, 0xA1, 0xF8, 0xE0, 0x52, 0x15, 0xB7, 0x0B, 0x57, 0x00, 0xBD, // Master key 0F encrypted with Master key 10. }; private static void DerivePerConsoleKeys(KeySet s) diff --git a/src/LibHac/Common/Utilities.cs b/src/LibHac/Common/Utilities.cs index a064e004..e941ec8b 100644 --- a/src/LibHac/Common/Utilities.cs +++ b/src/LibHac/Common/Utilities.cs @@ -294,7 +294,8 @@ public static class Utilities 0xC => "13.0.0-13.2.1", 0xD => "14.0.0-14.1.2", 0xE => "15.0.0-15.0.1", - 0xF => "16.0.0-", + 0xF => "16.0.0-16.1.0", + 0x10 => "17.0.0-", _ => "Unknown" };