No description
  • Rust 93.1%
  • Nix 6.9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-07-19 15:52:46 +09:00
src vdimgtool: Taito vdimg_ec decryptor and key bruteforcer 2026-07-19 15:52:46 +09:00
.gitignore vdimgtool: Taito vdimg_ec decryptor and key bruteforcer 2026-07-19 15:52:46 +09:00
Cargo.lock vdimgtool: Taito vdimg_ec decryptor and key bruteforcer 2026-07-19 15:52:46 +09:00
Cargo.toml vdimgtool: Taito vdimg_ec decryptor and key bruteforcer 2026-07-19 15:52:46 +09:00
flake.lock vdimgtool: Taito vdimg_ec decryptor and key bruteforcer 2026-07-19 15:52:46 +09:00
flake.nix vdimgtool: Taito vdimg_ec decryptor and key bruteforcer 2026-07-19 15:52:46 +09:00
README.md vdimgtool: Taito vdimg_ec decryptor and key bruteforcer 2026-07-19 15:52:46 +09:00

vdimgtool

Decrypt and key-recover Taito vdimg_ec arcade images. Reverse-engineered from the original Windows decryptor/bruteforcer and rewritten in Rust to build and run natively on NixOS.

Build

nix build            # -> ./result/bin/vdimgtool
nix run . -- <args>  # run without installing
nix develop          # dev shell (cargo, rustc, clippy)

Usage

# recover the key from the boot-sector signature (tries all keysets if omitted)
vdimgtool brute <in.img> [original|nesica|other]

# decrypt with a known key
vdimgtool decrypt <in.img> <out.img> <0xKEY> <original|nesica|other>

# brute + decrypt in one step
vdimgtool auto <in.img> <out.img> [original|nesica|other]

Streams arbitrarily large images; brute finishes in well under a second.

How it works (short version)

The 32-bit key is split into two 15-bit halves, each seeding a Numerical-Recipes ran3 PRNG. Their outputs interleave into a 2048-byte keystream that is XORed over the file; the nesica/other keysets add a per-2048-byte IV from tables lifted out of the original binary. Keys are brute-forced by anchoring on the decrypted DOS boot sector (EB xx 9055 AA).

Verified

Both sample images decrypt with key 0x78054d02, keyset nesica: vdimg_ec.img → NTFS, eeui_ec.img → FAT12 (ORBITAL).