3DS ROM decrypter. Odin + Dear ImGui + SDL3 + OpenGL 3.3. Port of citrust from Rust.
main.odin— entry point, GUI loopgui.odin— GUI screens (KeySetup, SelectFile, Decrypting, Done)keys.odin— CryptoMethod enumcrypto.odin— AES-CTR wrapper, 3DS key derivationkeydb.odin— KeyDatabase (parse/save/search aes_keys.txt)ncsd.odin— NCSD header parsingncch.odin— NCCH header parsingdecrypt.odin— decrypt_rom orchestratorvendor/imgui/— Dear ImGui + SDL3 + OpenGL3 backends via dcimgui C wrappervendor/sdl3_headers/— SDL3 C headers for backend compilationvendor/gl/— OpenGL 3.3 core bindings_compile_libs.sh— compiles ImGui C++ sources into static libRoboto.ttf— UI fontbuild.sh— Unix build scriptbuild.bat— Windows build script
First build (compiles vendor C++ libs, then Odin):
./build.sh [run|release|clean]
Subsequent builds (Odin-only, fast):
odin build . -vet -out:bin/citodin
odin run . -vet
odin check .
odin test .
./build.sh run builds and launches.
./build.sh release adds -o:speed.
./build.sh clean removes bin/ and build/.
- Phase 0: Project scaffolding ✅
- Phase 1: Core types & crypto (keys.odin, crypto.odin)
- Phase 2: Key database (keydb.odin)
- Phase 3: Header parsing (ncsd.odin, ncch.odin)
- Phase 4: Decryption orchestrator (decrypt.odin)
- Phase 5: GUI (gui.odin)
- Phase 6: Polish & cross-platform
- All source in
package mainacross multiple files (standard Odin convention) - Uses Odin's
core:crypto/aesfor AES-CTR (hardware-accelerated on x86_64) - Uses Odin's
core:mem/virtualfor memory-mapped file I/O - Threading via
core:threadfor parallel CTR decryption - Progress via mutex-guarded shared state (no channels needed)
- SDL3 for window + input, OpenGL 3.3 core for rendering
- ImGui backends: SDL3 platform + OpenGL3 renderer (standard Dear ImGui backends)
- Catppuccin dark theme
- Docking via
DockSpaceOverViewport+io.ConfigFlags |= {.DockingEnable} - Uncapped frame loop with sleep-based pacing + adaptive throttle
vendor:sdl3resolves to Odin's built-in SDL3 bindingsvendor/imguiresolves to localvendor/imgui/(not a built-in collection — use slash)- ImGui bindings via dcimgui C wrapper:
ImGui_prefix for bare functions,Imfor namespaced - Foreign lib blocks in imgui.odin: all backends link against the same
imgui.a