Skip to content

Commit

Permalink
Load Tad key into DSi AES engine
Browse files Browse the repository at this point in the history
  • Loading branch information
edo9300 authored Jan 10, 2025
1 parent 0c5dd28 commit 1c8feff
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/DSi_AES.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -575,4 +578,4 @@ void DSi_AES::WriteKeyY(u32 slot, u32 offset, u32 val, u32 mask)
}
}

}
}

0 comments on commit 1c8feff

Please sign in to comment.