Skip to content

NKit Scan Format

Nanook edited this page Sep 24, 2026 · 1 revision

.nkit.yaml — a container-independent, encryption-independent fingerprint of a disc image's logical structure. Used for verification, deduplication, and reconstruction.

Overview

A scan captures the complete logical layout of a disc image: areas, sections, internal files, gaps, checksums, and precise offsets. Because the pipeline decodes any container (ISO, RVZ, WBFS, GCZ, CHD, NKit) through its decoder before scanning, the same logical disc produces the same scan regardless of how it is stored. A GameCube ISO and an RVZ of the same disc produce identical scans.

Scans are written as .nkit.yaml (current format, v2.0). Legacy .nkit XML scans (v1.0) are still read but no longer written.


What a Scan Contains

  • System and media type — GameCube, Wii, WiiU, PS3, etc.
  • Image size and CRC32 / decrypted CRC32
  • Area records — the major regions of the disc (header, partition table, filesystems, audio, gaps)
  • Section records — individual 32KB blocks within each area, with CRC and type
  • File records — internal disc filesystem entries with offsets, sizes, and checksums
  • Encryption state — whether each area is encrypted and what key was used
  • Verification metadata — checksums used for in-checksum and dat-lookup verification

File Format (YAML v2.0)

Version: "2.0"
System: Wii
Media: WII
Type: Retail
Size: 4699979776
CRC: E7D03C7B
DecryptedCRC: CA7EC39B

Areas:
  - Type: ImageHeader
    Offset: 0
    Size: 32768
    CRC: 1A2B3C4D
    ...
  - Type: FileSystem
    Offset: 458752
    Size: 1234567
    Files:
      - Path: /DATA/main.dol
        Offset: 458752
        Size: 1048576
        CRC: AABBCCDD
    ...

Compact mode (default for scan task output): includes area/section structure and file paths but omits per-section detail.

Verbose mode (--scan-format verbose): includes full per-section CRC data for forensic comparison.


Producing Scans

# Scan a single image (Windows)
nkit.exe scan "Super Mario World (USA).iso" --scan-out D:\Scans

# Scan a folder recursively (Linux)
./nkit scan ~/roms --recursive --scan-out ~/scans

# Scan with verbose output
./nkit scan game.iso --scan-out ./scans --scan-format verbose

Output file: <image-name>.nkit.yaml in the scan output directory.


Using Scans for Verification

Scans feed into the NKit verification chain. When a scan exists for an image, NKit can verify the image by comparing its computed sections against the stored scan values — without needing a dat file.

# Verify using a previously saved scan
./nkit verify game.rvz --scan-in ~/scans

The verification chain (in order of preference): InChecksums → InScanCompare → DatLookup → ScanCompare. See NKit Verify for details.


Container Independence

The same Wii game stored as ISO, RVZ, WBFS, or CISO all produce identical scans because:

  1. The container decoder (*AsIso) presents a uniform logical disc stream
  2. The scanner operates on that logical stream, not the container bytes
  3. Encryption is handled before scanning — PS3 encrypted and decrypted versions produce the same scan

This means a scan produced from an RVZ can verify an ISO of the same game, and vice versa.


Legacy XML Format (.nkit)

The original scan format (v1.0) used XML with a .nkit extension. It is still read by NKit for backwards compatibility but is no longer written.


Related

Clone this wiki locally