From 387bf46e5ac6636863863a4a7d4dda69a088f2cb Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Wed, 16 Dec 2020 16:07:45 -0800 Subject: [PATCH] Fix incorrect matching criteria --- NDecrypt/DSTool.cs | 10 ++-------- README.md | 4 +++- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/NDecrypt/DSTool.cs b/NDecrypt/DSTool.cs index 140761a..7721145 100644 --- a/NDecrypt/DSTool.cs +++ b/NDecrypt/DSTool.cs @@ -119,7 +119,8 @@ namespace NDecrypt // Improperly decrypted empty secure area (decrypt empty with woodsec) else if ((firstValue == 0xE386C397 && secondValue == 0x82775B7E) - || (firstValue == 0xF98415B8 && secondValue == 0x698068FC)) + || (firstValue == 0xF98415B8 && secondValue == 0x698068FC) + || (firstValue == 0xA71329EE && secondValue == 0x2A1D4C38)) { Console.WriteLine("Improperly decrypted empty secure area found. Should be encrypted to get proper value."); return true; @@ -151,13 +152,6 @@ namespace NDecrypt return true; } - // Properly encrypted prototype value - else if (firstValue == 0xA71329EE && secondValue == 0x2A1D4C38) - { - Console.WriteLine("Encrypted secure area for prototype found."); - return false; - } - // Standard decryption values return firstValue == 0xE7FFDEFF && secondValue == 0xE7FFDEFF; } diff --git a/README.md b/README.md index 43a9fc3..7717b04 100644 --- a/README.md +++ b/README.md @@ -45,13 +45,15 @@ The last 4 are only required if you use the `-dev` flag. Once again, don't ask f ## But does it work? -As much as I'd like to think that this program is entirely without flaws, numbers need to speak for themselves sometimes. Here's a list of the known sets and their current compatibility percentages with woodsec and the Python scripts (as of 2020-12-15). Please note that this does not take into account invalid data in the known set, such as incorrectly encrypted or decrypted secure areas or prototype cartridges. +As much as I'd like to think that this program is entirely without flaws, numbers need to speak for themselves sometimes. Here's a list of the supported sets and their current compatibility percentages with woodsec and the Python scripts (as of 2020-12-16): - **Nintendo DS** - >99% compatible (Both encryption and decryption) - **Nintendo DSi** - 100% compatible (Both encryption and decryption) - **Nintendo 3DS** - UNKNOWN (Currently being tested) - **Nintendo New 3DS** - 100% compatible (Both encryption and decryption) +Please note the above numbers are based on the current, documented values, not necessarily what is correct. For example, in the Nintendo DS set, there are issues with empty secure areas being encrypted or decrypted, prototype cartridges, and unlicensed cartridges, all of which have strange, potentially hacky values in their secure areas. + ## Anything else? I'd like to thank the developers of the original programs for doing the actual hard work to figure things out. I'd also like to thank everyone who helped to test this against the original programs and made code suggestions.