mirror of
https://github.com/PabloMK7/citra.git
synced 2025-09-11 13:20:04 +00:00
Add consolidated GodMode9 key dumping script. (#6396)
This commit is contained in:
parent
8d19483b7e
commit
b6e73f0d49
5 changed files with 396 additions and 8 deletions
|
@ -31,13 +31,12 @@ constexpr std::array<u8, 10> KeyTypes{{
|
|||
HW::AES::APTWrap,
|
||||
HW::AES::BOSSDataKey,
|
||||
0x32, // unknown
|
||||
HW::AES::DLPDataKey,
|
||||
HW::AES::DLPNFCDataKey,
|
||||
HW::AES::CECDDataKey,
|
||||
0, // invalid
|
||||
HW::AES::FRDKey,
|
||||
// Note: According to 3dbrew the KeyY is overridden by Process9 when using this key type.
|
||||
// TODO: implement this behaviour?
|
||||
HW::AES::NFCKey,
|
||||
HW::AES::DLPNFCDataKey,
|
||||
}};
|
||||
|
||||
void PS_PS::EncryptDecryptAes(Kernel::HLERequestContext& ctx) {
|
||||
|
@ -60,6 +59,12 @@ void PS_PS::EncryptDecryptAes(Kernel::HLERequestContext& ctx) {
|
|||
// and encrypted data is actually returned, but the key used is unknown.
|
||||
ASSERT_MSG(key_type != 7 && key_type < 10, "Key type is invalid");
|
||||
|
||||
if (key_type == 0x5) {
|
||||
HW::AES::SelectDlpNfcKeyYIndex(HW::AES::DlpNfcKeyY::Dlp);
|
||||
} else if (key_type == 0x9) {
|
||||
HW::AES::SelectDlpNfcKeyYIndex(HW::AES::DlpNfcKeyY::Nfc);
|
||||
}
|
||||
|
||||
if (!HW::AES::IsNormalKeyAvailable(KeyTypes[key_type])) {
|
||||
LOG_ERROR(Service_PS,
|
||||
"Key 0x{:2X} is not available, encryption/decryption will not be correct",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue