Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add key sources for 19.0.0 #314

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions build/CodeGen/IncludedKeys.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ master_kek_source_0e = 6E7786AC830A8D3E7DB766A022B76E67
master_kek_source_0f = 99220957A7F95E94FE787F41D6E756E6
master_kek_source_10 = 71B9A6C0FF976B0CB440B9D5815D8190
master_kek_source_11 = 00045DF04DCD14A31CBFDE4855BA35C1
master_kek_source_12 = D76374464EBA780A7C9DB3E87A3D71E3

mariko_master_kek_source_05 = 77605AD2EE6EF83C3F72E2599DAC5E56
mariko_master_kek_source_06 = 1E80B8173EC060AA11BE1A4AA66FE4AE
Expand All @@ -36,6 +37,7 @@ mariko_master_kek_source_0e = EC61BC821E0F5AC32B643F9DD619222D
mariko_master_kek_source_0f = A5EC16391A3016082ECF096F5E7CEEA9
mariko_master_kek_source_10 = 8DEE9E11363A9B0A6AC7BBE9D103F780
mariko_master_kek_source_11 = 4F413C3BFB6A012A689F83E953BD16D2
mariko_master_kek_source_12 = 31BE25FBDBB4EE495C7705C2369F3480

mariko_master_kek_source_dev_05 = 32C0976B636D4464F23AA5C0DE46CCE9
mariko_master_kek_source_dev_06 = CC974C462A0CB0A6C9C0B7BE302EC368
Expand All @@ -50,6 +52,7 @@ mariko_master_kek_source_dev_0e = 18A56FEF721162C51A14F18C218327B7
mariko_master_kek_source_dev_0f = 3A9CF0397023F6AF714460F46DEDA1D6
mariko_master_kek_source_dev_10 = 43DB9D88DB38E9BF3DD78339EFB14FA7
mariko_master_kek_source_dev_11 = E445D014A0E5E94BFE76F42941BB64ED
mariko_master_kek_source_dev_12 = 657B11460EC2225DB9F1F500F93E1F70

master_key_source = D8A2410AC6C59001C61D6A267C513F3C

Expand Down
2 changes: 2 additions & 0 deletions src/LibHac/Common/Keys/KeyDerivation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ private static ReadOnlySpan<AesKey> MasterKeyVectors(KeySet s) =>
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.
0x0C, 0x75, 0x39, 0x15, 0x53, 0xEA, 0x81, 0x11, 0xA3, 0xE0, 0xDC, 0x3D, 0x0E, 0x76, 0xC6, 0xB8, // Master key 10 encrypted with Master key 11.
0x90, 0x64, 0xF9, 0x08, 0x29, 0x88, 0xD4, 0xDC, 0x73, 0xA4, 0xA1, 0x13, 0x9E, 0x59, 0x85, 0xA0, // Master key 11 encrypted with Master key 12.
];

private static ReadOnlySpan<byte> MasterKeyVectorsProd =>
Expand All @@ -334,6 +335,7 @@ private static ReadOnlySpan<AesKey> MasterKeyVectors(KeySet s) =>
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.
0x58, 0x15, 0xD2, 0xF6, 0x8A, 0xE8, 0x19, 0xAB, 0xFB, 0x2D, 0x52, 0x9D, 0xE7, 0x55, 0xF3, 0x93, // Master key 10 encrypted with Master key 11.
0x90, 0x64, 0xF9, 0x08, 0x29, 0x88, 0xD4, 0xDC, 0x73, 0xA4, 0xA1, 0x13, 0x9E, 0x59, 0x85, 0xA0, // Master key 11 encrypted with Master key 12.
];

private static void DerivePerConsoleKeys(KeySet s)
Expand Down
3 changes: 2 additions & 1 deletion src/LibHac/Common/Utilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,8 @@ public static void MemDump(this StringBuilder sb, string prefix, byte[] data)
0xE => "15.0.0-15.0.1",
0xF => "16.0.0-16.1.0",
0x10 => "17.0.0-17.0.1",
0x11 => "18.0.0-",
0x11 => "18.0.0-18.1.0",
0x12 => "19.0.0-",
_ => "Unknown"
};

Expand Down