mirror of
https://github.com/SabreTools/NDecrypt.git
synced 2026-02-04 05:35:53 +00:00
Bug with 3ds decryption routine #20
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Dimensional on GitHub (Mar 30, 2025).
Originally assigned to: @mnadareski on GitHub.
When attempting to decrypt a 3ds/cci file using either v0.3.1 or the rolling release, the decrypted file does not match the hash for no-intro. Additionally, if I take a pre-existing decrypted file who's checksum matches no-intro, it encrypts fine, but decrypting it back produces checksums that are not matching the original, which also causes re-encryption to also produce a different checksum. I have tested with some 3ds files like Xenoblade Chronicles 3D Rev 1 (USA) and Pokemon Omega Ruby Rev 2 (USA).
Not sure if this is a bug in the program or some bug that has to do with the use of .net9, but this doesn't appear to exist at all within v0.2.5.
@mnadareski commented on GitHub (Mar 30, 2025):
I'll mark 0.3.1 as unreliable for now as most of the "normal" things that could go wrong aren't.
@mnadareski commented on GitHub (Apr 1, 2025):
Debugging has determined that key, IV, and counter all seem to be initialized identically. Compared to some of the original Python scripts, the read is pulling a different set of data, seemingly? The bytes being read don't match with what is in the file. All of the math that changed to convert the keys and arrays is consistent all the way up to that point. Still investigating.
@mnadareski commented on GitHub (Apr 1, 2025):
Issue was that cached values were being used for the ExeFS file table.