From 1c8fefff0352dc119a5c4b2d9d2b24f4a8a16028 Mon Sep 17 00:00:00 2001 From: Edoardo Lolletti Date: Fri, 10 Jan 2025 18:36:44 +0100 Subject: [PATCH] Load Tad key into DSi AES engine --- src/DSi_AES.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/DSi_AES.cpp b/src/DSi_AES.cpp index 36fe2892bb..3137afb9a8 100644 --- a/src/DSi_AES.cpp +++ b/src/DSi_AES.cpp @@ -90,6 +90,9 @@ void DSi_AES::Reset() *(u32*)&KeyX[1][8] = (u32)(consoleid >> 32) ^ 0xC80C4B72; *(u32*)&KeyX[1][12] = (u32)consoleid; + // slot 2: For 'Tad' + std::memcpy(KeyX[2], &DSi.ARM9iBIOS[0x8B8C], 0x10); + // slot 3: console-unique eMMC crypto *(u32*)&KeyX[3][0] = (u32)consoleid; *(u32*)&KeyX[3][4] = (u32)consoleid ^ 0x24EE6906; @@ -575,4 +578,4 @@ void DSi_AES::WriteKeyY(u32 slot, u32 offset, u32 val, u32 mask) } } -} \ No newline at end of file +}