Skip to content

Repository files navigation

citrust

CI GitHub Release

A fast 3DS ROM decryption tool, written in Rust. Drop-in replacement for b3DSDecrypt.py — roughly 4× faster.


✨ Features

  • Decrypts .3ds ROM files in-place — no extra disk space needed
  • All encryption methods supported: Original (KeyX 0x2C), Key7x (0x25), Key93 (0x18), Key96 (0x1B)
  • Hardware-accelerated AES — automatic AES-NI detection, zero configuration
  • Memory-mapped I/O with zero-copy decryption
  • Parallel decryption across all CPU cores
  • CLI for scripting and automation
  • GUI with a SteamOS-friendly design (large buttons, dark theme, Steam Deck resolution)

🚀 Performance

ROM Size Python (b3DSDecrypt) citrust Speedup
1.84 GB 4.73 s 1.16 s 4.1×

📸 GUI

citrust GUI

Launch citrust-gui, click Select ROM File, click Decrypt — done.

📥 Installation

Download (recommended)

Grab the latest release for your platform:

👉 GitHub Releases — Linux and Windows binaries available.

Build from source

git clone https://github.com/londospark/citrust.git
cd citrust
cargo build --release -p citrust-cli    # CLI only
cargo build --release -p citrust-gui    # GUI (needs a display server)

Requires Rust 1.85+ and an x86_64 CPU (AES-NI recommended for full performance).

🔑 Key Setup (Required)

citrust requires an aes_keys.txt file containing your 3DS encryption keys. This is the same format used by Citra, Azahar, and other 3DS emulators — if you already have one, citrust can use it directly.

The GUI will prompt you to select a key file on first launch. Once provided, keys are saved automatically and you won't need to do this again.

Where citrust looks for keys (checked in order):

Location Platform
./aes_keys.txt (next to the ROM or current directory) All
~/.config/citrust/aes_keys.txt Linux / SteamOS
%APPDATA%\citrust\aes_keys.txt Windows
~/.local/share/citra-emu/sysdata/aes_keys.txt Linux (Citra)
~/.local/share/azahar-emu/sysdata/aes_keys.txt Linux (Azahar)
%APPDATA%\Citra\sysdata\aes_keys.txt Windows (Citra)

You can also specify a path explicitly with --keys (CLI) or the Browse button (GUI).

Dumping keys from your 3DS

You can dump keys from your 3DS hardware using GodMode9. See the GodMode9 usage guide for instructions.

🔧 Usage

CLI

citrust path/to/rom.3ds                   # uses auto-detected key file
citrust path/to/rom.3ds --keys keys.txt   # use a specific key file

The ROM is decrypted in-place. citrust auto-detects the encryption method and handles everything.

GUI

  1. Launch citrust-gui
  2. On first run, click Browse for Key File and select your aes_keys.txt
  3. Keys are saved automatically — you won't see this step again
  4. Click Select ROM File
  5. Click Decrypt
  6. Done

🏗️ Architecture

citrust is a Cargo workspace with three crates:

Crate Type Description
citrust-core Library Crypto, ROM parsing, decryption logic
citrust-cli Binary Command-line interface
citrust-gui Binary GUI application (egui/eframe)

🙏 Credits

  • Original Python decryption tool: b3DS by b1k
  • AI team management: Squad by Brady Gaster

About

Rust port of b3DSDecrypt.py — 3DS ROM decryption tool with SteamOS GUI

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages