Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
NDecrypt
General
AuthorSabreTools
TypeFile Operation
Version0.3.2
LicenseMIT License
Last Updated2025/04/05
Links
Download
Website
Source

NDecrypt is a tool that allows you to encrypt and decrypt your personally dumped NDS and N3DS roms with minimal hassle. The only caveat right now is that you need a keys.bin file for your personally obtained encryption keys.

This is a code port of 3 different programs: 3ds_encrypt.py, 3ds_decrypt.py and woodsec (part of wooddumper).

User guide

You will need at least one of these files in order to use it.

Usage: NDecrypt <operation> [flags] <path> ...

Possible values for <operation>:
e, encrypt - Encrypt the input files
d, decrypt - Decrypt the input files
i, info    - Output file information

Possible values for [flags] (one or more can be used):
-c, --config <path>   Path to config.json
-a, --aes-keys        Enable using aes_keys.txt instead of keys.bin
-k, --keyfile <path>  Path to keys.bin or aes_keys.txt
-d, --development     Enable using development keys, if available
-f, --force           Force operation by avoiding sanity checks
-h, --hash            Output size and hashes to a companion file

Additional Notes:

  • Input files are overwritten, even if they are only partially processed. You should make backups of the files you're working on if you're worried about this.
  • Mixed folders or inputs are also accepted, you can decrypt or encrypt multiple files, regardless of their type. This being said, you can only do encrypt OR decrypt at one time.
  • Required files will automatically be searched for in the application runtime directory as well as %HOME%/.config/ndecrypt, also known as %USERPROFILE%\.config\ndecrypt on Windows.
  • If found, config.json will take priority over both keys.bin and aes_keys.txt, even if -a and/or -k are defined. You've been warned.

Changelog

v0.3.2

  • Updated default build to .NET 9 and added build support going all the way back to .NET Framework 2.0.
  • Added support for Windows. OSX, and Linux ARM64.
  • Overhaul and simplification of code structure.
  • Migration to shared libraries for models, serialization, and hashing.
  • Overhaul on automatic builds and testing, including unified build scripts.
  • Introduction of the new info operation to quickly scan and check the status of multiple files.
  • Automatic searching for required files in more locations.
  • Introduction of the new config.json configuration file.
    • Meant to replace both keys.bin and aes_keys.txt.
    • Will be the default as of 0.4.x.
    • Requires Nintendo DS value to be provided.
  • Added automatic validation of keys if they are supplied.

v0.3.1

  • For users who wanted to start using 0.3.x, please start with this version. The previous version had undiscovered bugs related to many of the cleanup changes that I introduced over the course of a couple months. It was lightly tested and nobody reported issues, so they were not obvious until after 0.3.0 went out.

v0.3.0

v0.2.5

  • License has been correctly set to MIT instead of the "whatever" mentioned before.
  • Build targets for Windows x86, Windows x64, Linux x64, and OSX x64 have been added for packaging.
  • .NET Core 3.1 has been removed as a build version.
  • AppVeyor has been enabled to allow for easier testing of WIP builds.

v0.2.4

  • .NET 5 support has been dropped.
  • .NET 6 support (hashing and encrypt/decrypt) have been fixed.
  • Internal structure changed to be more library-oriented.

v0.2.3

  • Add support for outputting file hashes to a companion file.
  • Add support for alternate keyfile paths.
  • Add support for Citra aes_keys.txt.
  • Major internal cleanups and code separation.
  • Converted core library to .NET Standard 2.0.
  • Added .NET 6.0 as build target for main executable.

v0.2.2

  • Added a couple of fixes for NDS Prince of Persia carts that have mastering oddities.
  • Added the .ids iQue DS extension to matching.
  • Fixed the matching criteria for some of the NDS signatures.
  • Added more improperly decrypted empty secure area NDS signatures.
  • Remove forced pause at end of program run.
  • Make keys.bin only required for 3DS and New 3DS processing.
  • Add some try/catch blocks around processing so it doesn't hard crash (issue with incorrectly-named BIOS files).

v0.2.1

  • Merged two projects into one again, based on the Core version from last time. No changes to supported frameworks due to this.
  • Reorganized a bit of the code internally in case other cart types get supported in the future.
  • Added a couple of fixes for NDS Dragon Quest V carts that have mastering oddities.

v0.2.0

  • Internal cleanup of most of the code.
  • Removed .NET Framework 4.6.1 build.
  • Added .NET Framework 4.8, .NET Core 3.1, and .NET 5.0 builds.
  • Fixed NDS secure areas.
  • Fixed larger game carts.
  • Fixed encrypting N3DS carts.
  • Add force flags for NDS and N3DS.

Credits

  • Thanks to the developers of the original programs for doing the actual hard work to figure things out.
  • Also thanks to everyone who helped to test this against the original programs and made code suggestions.

Disclaimer: This program is only for use with personally dumped files and keys and is not meant for enabling illegal activity.

External links

Advertising: