Software Requirements Specification

Introduction

Purpose

This SRS defines MVP requirements for AirGap Transfer, a command-line utility for safely transferring large files across air-gap boundaries.

Scope

Product: AirGap Transfer — a minimal CLI tool for chunked file transfers via removable media.

In Scope:

  • Split large datasets into chunks for USB transfer

  • Reconstruct files from chunks with integrity verification

  • Resume interrupted transfers

  • Cross-platform support (macOS, Windows, Linux)

Out of Scope:

  • Network transfers, cloud sync, auto-updates

  • Compression or encryption (defer to post-MVP; cryptographic agility for hashing is in scope)

  • GUI interface

  • Real-time synchronization

  • Ollama-specific logic (general-purpose only)

Definitions

Term

Definition

Air-gap

Physical separation between systems with no network connectivity

Chunk

A fixed-size tar archive containing a portion of source data

Pack

Operation to split source files into chunks

Unpack

Operation to reconstruct files from chunks

Manifest

Metadata file describing chunk inventory and checksums

Cryptographic agility

Ability to swap hash algorithms without rearchitecting the system

Overall Description

Product Perspective

Standalone CLI tool for transferring data across air-gap boundaries using removable media. All operations occur locally with no network connectivity. See the Software Design Document for architecture diagrams and component details.

Constraints

Constraint

Description

Offline-only

Zero network calls at runtime

Air-gap ready

Deployable without internet access

Platforms

macOS, Windows, Linux

UI model

Command-line interface only (no GUI)

Media

Works with standard removable media (USB, external drives)

Functional Requirements

Pack Operation

ID

Priority

Title

FR-TRANSFER-001

must

Split Files into Chunks

FR-TRANSFER-002

must

Auto-Detect USB Capacity

FR-TRANSFER-003

must

Generate Chunk Checksums

FR-TRANSFER-004

must

Create Manifest File

FR-TRANSFER-005

must

Stream Data to USB

FR-TRANSFER-006

should

Manual Chunk Size Specification

FR-TRANSFER-007

should

Show Pack Progress

FR-TRANSFER-008

should

Prompt for USB Swapping

FR-TRANSFER-026

should

Resume Interrupted Pack

FR-TRANSFER-028

must

Pack Command

Requirement: Split Files into Chunks FR-TRANSFER-001
status: approved
tags: transfer, pack, chunking
priority: must
release: v1.0
is tested by: TC-PCK-001, TC-PCK-002

Split source files/directories into fixed-size chunks

Requirement: Auto-Detect USB Capacity FR-TRANSFER-002
status: approved
tags: transfer, pack, usb
priority: must
release: v1.0
is tested by: TC-PCK-003

Auto-detect USB capacity and set chunk size accordingly

Requirement: Generate Chunk Checksums FR-TRANSFER-003
status: approved
tags: transfer, pack, checksum, security
priority: must
release: v1.0
is tested by: TC-PCK-004

Generate checksums for each chunk using the configured hash algorithm (default: SHA-256)

Requirement: Create Manifest File FR-TRANSFER-004
status: approved
tags: transfer, pack, manifest
priority: must
release: v1.0
is tested by: TC-PCK-005

Create manifest file with chunk metadata and checksums

Requirement: Stream Data to USB FR-TRANSFER-005
status: approved
tags: transfer, pack, streaming, performance
priority: must
release: v1.0
is tested by: TC-PCK-006

Stream data directly to USB without intermediate temp files

Requirement: Manual Chunk Size Specification FR-TRANSFER-006
status: approved
tags: transfer, pack, configuration
priority: should
release: v1.0
is tested by: TC-PCK-007

Support manual chunk size specification

Requirement: Show Pack Progress FR-TRANSFER-007
status: approved
tags: transfer, pack, ui, progress
priority: should
release: v1.0
is tested by: TC-PCK-008

Show progress during chunk creation

Requirement: Prompt for USB Swapping FR-TRANSFER-008
status: approved
tags: transfer, pack, usb, ui
priority: should
release: v1.0
is tested by: TC-PCK-009

Prompt for USB swapping when multiple chunks needed

Unpack Operation

ID

Priority

Title

FR-TRANSFER-009

must

Reconstruct Files from Chunks

FR-TRANSFER-010

must

Verify Chunk Checksums Before Unpack

FR-TRANSFER-011

must

Place Files in Destination

FR-TRANSFER-012

must

Validate Chunk Completeness

FR-TRANSFER-013

should

Resume Partial Unpacks

FR-TRANSFER-014

should

Delete Chunks After Unpack

FR-TRANSFER-015

should

Show Unpack Progress

FR-TRANSFER-027

should

Resume Interrupted Unpack

FR-TRANSFER-029

must

Unpack Command

Requirement: Reconstruct Files from Chunks FR-TRANSFER-009
status: approved
tags: transfer, unpack, reconstruction
priority: must
release: v1.0
is tested by: TC-UNP-001

Reconstruct original files from chunks

Requirement: Verify Chunk Checksums Before Unpack FR-TRANSFER-010
status: approved
tags: transfer, unpack, verification, security
priority: must
release: v1.0
is tested by: TC-UNP-002

Verify chunk checksums before reconstruction

Requirement: Place Files in Destination FR-TRANSFER-011
status: approved
tags: transfer, unpack, filesystem
priority: must
release: v1.0
is tested by: TC-UNP-003

Place reconstructed files in specified destination

Requirement: Validate Chunk Completeness FR-TRANSFER-012
status: approved
tags: transfer, unpack, validation
priority: must
release: v1.0
is tested by: TC-UNP-004

Validate chunk completeness (all chunks present)

Requirement: Resume Partial Unpacks FR-TRANSFER-013
status: approved
tags: transfer, unpack, resume, reliability
priority: should
release: v1.0
is tested by: TC-UNP-005

Resume partial unpacks if interrupted

Requirement: Delete Chunks After Unpack FR-TRANSFER-014
status: approved
tags: transfer, unpack, cleanup
priority: should
release: v1.0
is tested by: TC-UNP-006

Optionally delete chunks after successful reconstruction

Requirement: Show Unpack Progress FR-TRANSFER-015
status: approved
tags: transfer, unpack, ui, progress
priority: should
release: v1.0
is tested by: TC-UNP-007

Show progress during reconstruction

List Operation

ID

Priority

Title

FR-TRANSFER-016

must

Display Chunk Inventory

FR-TRANSFER-017

must

Show Chunk Sizes and Status

FR-TRANSFER-018

should

Identify Missing Chunks

FR-TRANSFER-019

should

Display Estimated Total Size

FR-TRANSFER-030

must

List Command

Requirement: Display Chunk Inventory FR-TRANSFER-016
status: approved
tags: transfer, list, manifest
priority: must
release: v1.0
is tested by: TC-LST-001

Display chunk inventory from manifest

Requirement: Show Chunk Sizes and Status FR-TRANSFER-017
status: approved
tags: transfer, list, verification
priority: must
release: v1.0
is tested by: TC-LST-002

Show chunk sizes and verification status

Requirement: Identify Missing Chunks FR-TRANSFER-018
status: approved
tags: transfer, list, validation
priority: should
release: v1.0
is tested by: TC-LST-003

Identify missing or corrupted chunks

Requirement: Display Estimated Total Size FR-TRANSFER-019
status: approved
tags: transfer, list, ui
priority: should
release: v1.0
is tested by: TC-LST-004

Display estimated total size after reconstruction

Integrity Verification

ID

Priority

Title

FR-TRANSFER-010

must

Verify Chunk Checksums Before Unpack

FR-TRANSFER-017

must

Show Chunk Sizes and Status

FR-TRANSFER-020

must

Generate Checksums

FR-TRANSFER-021

must

Verify Checksums During Unpack

FR-TRANSFER-022

must

Detect Corrupted Chunks

FR-TRANSFER-023

should

Verify Final File Checksum

FR-TRANSFER-032

must

No-Verify Flag

Requirement: Generate Checksums FR-TRANSFER-020
status: approved
tags: transfer, verification, checksum, security
priority: must
release: v1.0
is tested by: TC-INT-001

Generate checksums during pack using the configured hash algorithm (default: SHA-256)

Requirement: Verify Checksums During Unpack FR-TRANSFER-021
status: approved
tags: transfer, verification, checksum, security
priority: must
release: v1.0
is tested by: TC-INT-002

Verify checksums during unpack

Requirement: Detect Corrupted Chunks FR-TRANSFER-022
status: approved
tags: transfer, verification, error-handling
priority: must
release: v1.0
is tested by: TC-INT-003

Detect corrupted chunks and report errors

Requirement: Verify Final File Checksum FR-TRANSFER-023
status: approved
tags: transfer, verification, checksum, security
priority: should
release: v1.0
is tested by: TC-INT-004

Verify final reconstructed file against original checksum

Cryptographic Agility

ID

Priority

Title

FR-TRANSFER-045

must

Configurable Hash Algorithm

FR-TRANSFER-046

must

Algorithm Identified in Manifest

FR-TRANSFER-047

must

Pluggable Hash Backend

FR-TRANSFER-051

should

AEAD Algorithm Default and Agility

Requirement: Configurable Hash Algorithm FR-TRANSFER-045
status: approved
tags: transfer, crypto-agility, security
priority: must
release: v1.0

The system SHALL allow users to select a hash algorithm via CLI flag (--hash-algorithm). Default: SHA-256.

Requirement: Algorithm Identified in Manifest FR-TRANSFER-046
status: approved
tags: transfer, crypto-agility, manifest, security
priority: must
release: v1.0
is tested by: TC-CRA-003, TC-CRA-004

The manifest SHALL record which hash algorithm was used, so unpack can verify with the correct algorithm.

Requirement: Pluggable Hash Backend FR-TRANSFER-047
status: approved
tags: transfer, crypto-agility, security
priority: must
release: v1.0
is tested by: TC-CRA-005

The hash module SHALL use a trait-based interface so new algorithms can be added without modifying existing code.

State Management

ID

Priority

Content

FR-TRANSFER-024

must

Maintain operation state in manifest file

FR-TRANSFER-025

must

Track chunk completion status

FR-TRANSFER-026

should

Support resume for interrupted pack operations

FR-TRANSFER-027

should

Support resume for interrupted unpack operations

Requirement: Maintain Operation State FR-TRANSFER-024
status: approved
tags: transfer, state, manifest
priority: must
release: v1.0
is tested by: TC-STA-001

Maintain operation state in manifest file

Requirement: Track Chunk Completion FR-TRANSFER-025
status: approved
tags: transfer, state, tracking
priority: must
release: v1.0
is tested by: TC-STA-002

Track chunk completion status

Requirement: Resume Interrupted Pack FR-TRANSFER-026
status: approved
tags: transfer, state, resume, pack
priority: should
release: v1.0
is tested by: TC-STA-003

Support resume for interrupted pack operations

Requirement: Resume Interrupted Unpack FR-TRANSFER-027
status: approved
tags: transfer, state, resume, unpack
priority: should
release: v1.0
is tested by: TC-STA-004

Support resume for interrupted unpack operations

Command Interface

ID

Priority

Title

FR-TRANSFER-028

must

Pack Command

FR-TRANSFER-029

must

Unpack Command

FR-TRANSFER-030

must

List Command

FR-TRANSFER-031

must

Dry Run Flag

FR-TRANSFER-032

must

No-Verify Flag

FR-TRANSFER-033

should

Chunk Size Flag

FR-TRANSFER-034

should

Verbose Flag

Requirement: Pack Command FR-TRANSFER-028
status: approved
tags: transfer, cli, pack
priority: must
release: v1.0
is tested by: TC-TRANSFER-CLI-001

airgap-transfer pack <source> <dest> command

Requirement: Unpack Command FR-TRANSFER-029
status: approved
tags: transfer, cli, unpack
priority: must
release: v1.0
is tested by: TC-TRANSFER-CLI-002

airgap-transfer unpack <source> <dest> command. The <source> argument is a single directory path containing chunk files and the manifest. When chunks span multiple USB drives, the user connects drives sequentially and the tool prompts for swaps.

Requirement: List Command FR-TRANSFER-030
status: approved
tags: transfer, cli, list
priority: must
release: v1.0
is tested by: TC-TRANSFER-CLI-003

airgap-transfer list <chunk-location> command

Requirement: Dry Run Flag FR-TRANSFER-031
status: approved
tags: transfer, cli, dry-run
priority: must
release: v1.0
is tested by: TC-TRANSFER-CLI-004

--dry-run flag for all operations

Requirement: No-Verify Flag FR-TRANSFER-032
status: approved
tags: transfer, cli, verification
priority: must
release: v1.0
is tested by: TC-TRANSFER-CLI-005

Checksum verification SHALL be enabled by default for all operations. The --no-verify flag SHALL disable verification. This ensures integrity checking is the default behavior per FR-TRANSFER-010.

Requirement: Chunk Size Flag FR-TRANSFER-033
status: approved
tags: transfer, cli, configuration
priority: should
release: v1.0
is tested by: TC-TRANSFER-CLI-006

--chunk-size flag for manual chunk size specification

Requirement: Verbose Flag FR-TRANSFER-034
status: approved
tags: transfer, cli, logging
priority: should
release: v1.0
is tested by: TC-TRANSFER-CLI-007

--verbose flag for detailed output

Error Handling

ID

Priority

Content

FR-TRANSFER-022

must

Detect corrupted chunks and report errors

FR-TRANSFER-035

must

Detect and report insufficient USB capacity

FR-TRANSFER-036

must

Handle missing chunks gracefully

FR-TRANSFER-037

must

Provide clear error messages with suggested actions

Requirement: Detect Insufficient USB Capacity FR-TRANSFER-035
status: approved
tags: transfer, error-handling, usb
priority: must
release: v1.0
is tested by: TC-TRANSFER-ERR-001

Detect and report insufficient USB capacity

Requirement: Handle Missing Chunks FR-TRANSFER-036
status: approved
tags: transfer, error-handling, chunks
priority: must
release: v1.0
is tested by: TC-TRANSFER-ERR-002

Handle missing chunks gracefully

Requirement: Clear Error Messages FR-TRANSFER-037
status: approved
tags: transfer, error-handling, usability
priority: must
release: v1.0
is tested by: TC-TRANSFER-ERR-003

Provide clear error messages with suggested actions

Safety Features

ID

Priority

Content

FR-TRANSFER-038

must

Confirm overwrite of existing files

FR-TRANSFER-039

must

Validate destination paths and permissions

FR-TRANSFER-040

must

Safely sync USB before prompting for removal

FR-TRANSFER-041

should

Atomic operations where possible

Requirement: Confirm File Overwrite FR-TRANSFER-038
status: approved
tags: transfer, safety, filesystem
priority: must
release: v1.0
is tested by: TC-SAF-001

Confirm overwrite of existing files

Requirement: Validate Destination Paths FR-TRANSFER-039
status: approved
tags: transfer, safety, validation
priority: must
release: v1.0
is tested by: TC-SAF-002

Validate destination paths and permissions

Requirement: Sync USB Safely FR-TRANSFER-040
status: approved
tags: transfer, safety, usb
priority: must
release: v1.0
is tested by: TC-SAF-003

Safely sync USB before prompting for removal

Requirement: Atomic Operations FR-TRANSFER-041
status: approved
tags: transfer, safety, reliability
priority: should
release: v1.0
is tested by: TC-SAF-004

Atomic operations where possible

Deployment

ID

Priority

Content

FR-TRANSFER-042

must

All dependencies available for offline build

FR-TRANSFER-043

must

Build process works without internet after initial setup

FR-TRANSFER-044

should

Single, static binary deployment

Requirement: Offline Build Dependencies FR-TRANSFER-042
status: approved
tags: transfer, deployment, offline
priority: must
release: v1.0
is tested by: TC-TRANSFER-DEP-001

All dependencies available for offline build

Requirement: Internet-Free Build FR-TRANSFER-043
status: approved
tags: transfer, deployment, offline
priority: must
release: v1.0
is tested by: TC-TRANSFER-DEP-002

Build process works without internet after initial setup

Requirement: Single, Static Binary Deployment FR-TRANSFER-044
status: approved
tags: transfer, deployment
priority: should
release: v1.0
is tested by: TC-TRANSFER-DEP-003

Single, static binary deployment

Non-Functional Requirements

ID

Priority

Content

NFR-TRANSFER-001

should

Chunk creation time < 10 minutes for 10GB dataset

NFR-TRANSFER-002

must

Memory footprint < 100 MB during streaming operations

NFR-TRANSFER-003

must

All data stays on local/removable media; no network calls

NFR-TRANSFER-004

must

100% functional offline

NFR-TRANSFER-005

must

Build and run on systems with no internet access

NFR-TRANSFER-006

must

Support macOS, Windows, Linux

NFR-TRANSFER-007

must

The system SHALL verify all chunks using the hash algorithm specified in the manifest before reconstruction

NFR-TRANSFER-008

must

Pack and unpack operations SHALL be idempotent (safe to run multiple times)

NFR-TRANSFER-009

must

The system SHALL handle interruptions gracefully (Ctrl+C, system shutdown) and allow resume

NFR-TRANSFER-010

must

The system SHALL detect and report data corruption via checksum mismatch

NFR-TRANSFER-011

must

Progress indicators SHALL be shown for all operations taking longer than 2 seconds

NFR-TRANSFER-012

must

Error messages SHALL include specific details about the failure and suggested fixes

NFR-TRANSFER-013

must

The CLI SHALL provide help text accessible via --help for all commands

NFR-TRANSFER-014

should

First-time users SHALL be able to transfer a file within 5 minutes using provided examples

NFR-TRANSFER-015

must

The codebase SHALL achieve at least 80% test coverage

NFR-TRANSFER-016

must

All public APIs SHALL have rustdoc documentation

NFR-TRANSFER-017

must

The code SHALL pass cargo clippy with zero warnings

NFR-TRANSFER-018

must

The code SHALL be formatted with rustfmt

NFR-TRANSFER-019

should

The system SHALL handle files up to 100GB in size

NFR-TRANSFER-020

must

Chunk operations SHALL use streaming architecture to handle files larger than available RAM

NFR-TRANSFER-021

could

The system SHOULD support concurrent chunk verification to improve performance

NFR-TRANSFER-022

must

The system SHALL be designed for cryptographic agility: hash algorithms are pluggable via a common trait interface, enabling adoption of new standards (e.g., post-quantum algorithms) without architectural changes.

NFR-TRANSFER-023

must

The system SHALL NOT write passphrases or derived keys to disk, logs, or the manifest in plaintext. Passphrases SHALL be read from an interactive terminal prompt (with echo disabled) or from a file descriptor, and SHALL be zeroized from memory after key derivation completes.

Performance

Non-Functional Requirement: Chunk Creation Performance NFR-TRANSFER-001
status: approved
tags: transfer, performance
priority: should
release: v1.0
is tested by: TC-TRANSFER-NFR-001

Chunk creation time < 10 minutes for 10GB dataset

Non-Functional Requirement: Memory Footprint NFR-TRANSFER-002
status: approved
tags: transfer, performance, memory
priority: must
release: v1.0
is tested by: TC-TRANSFER-NFR-002

Memory footprint < 100 MB during streaming operations

Reliability

Non-Functional Requirement: Checksum Verification Reliability NFR-TRANSFER-007
status: approved
tags: transfer, reliability, integrity
priority: must
release: v1.0
is tested by: TC-TRANSFER-NFR-007

The system SHALL verify all chunks using the hash algorithm specified in the manifest before reconstruction

Non-Functional Requirement: Idempotent Operations NFR-TRANSFER-008
status: approved
tags: transfer, reliability
priority: must
release: v1.0
is tested by: TC-TRANSFER-NFR-008

Pack and unpack operations SHALL be idempotent (safe to run multiple times)

Non-Functional Requirement: Graceful Interruption Handling NFR-TRANSFER-009
status: approved
tags: transfer, reliability, error-handling
priority: must
release: v1.0
is tested by: TC-TRANSFER-NFR-009

The system SHALL handle interruptions gracefully (Ctrl+C, system shutdown) and allow resume

Non-Functional Requirement: Data Corruption Detection NFR-TRANSFER-010
status: approved
tags: transfer, reliability, integrity
priority: must
release: v1.0
is tested by: TC-TRANSFER-NFR-010

The system SHALL detect and report data corruption via checksum mismatch

Usability

Non-Functional Requirement: Clear Progress Indicators NFR-TRANSFER-011
status: approved
tags: transfer, usability, ui
priority: must
release: v1.0
is tested by: TC-TRANSFER-NFR-011

Progress indicators SHALL be shown for all operations taking longer than 2 seconds

Non-Functional Requirement: Detailed Error Messages NFR-TRANSFER-012
status: approved
tags: transfer, usability, error-handling
priority: must
release: v1.0
is tested by: TC-TRANSFER-NFR-012

Error messages SHALL include specific details about the failure and suggested fixes

Non-Functional Requirement: Command Help Text NFR-TRANSFER-013
status: approved
tags: transfer, usability, cli
priority: must
release: v1.0
is tested by: TC-TRANSFER-NFR-013

The CLI SHALL provide help text accessible via –help for all commands

Non-Functional Requirement: First-Time User Experience NFR-TRANSFER-014
status: approved
tags: transfer, usability
priority: should
release: v1.0
is tested by: TC-TRANSFER-NFR-014

First-time users SHALL be able to transfer a file within 5 minutes using provided examples

Maintainability

Non-Functional Requirement: Test Coverage NFR-TRANSFER-015
status: approved
tags: transfer, maintainability, testing
priority: must
release: v1.0
is tested by: TC-TRANSFER-NFR-015

The codebase SHALL achieve at least 80% test coverage

Non-Functional Requirement: API Documentation NFR-TRANSFER-016
status: approved
tags: transfer, maintainability, documentation
priority: must
release: v1.0
is tested by: TC-TRANSFER-NFR-016

All public APIs SHALL have rustdoc documentation

Non-Functional Requirement: Clippy Compliance NFR-TRANSFER-017
status: approved
tags: transfer, maintainability, code-quality
priority: must
release: v1.0
is tested by: TC-TRANSFER-NFR-017

The code SHALL pass cargo clippy with zero warnings

Non-Functional Requirement: Code Formatting NFR-TRANSFER-018
status: approved
tags: transfer, maintainability, code-quality
priority: must
release: v1.0
is tested by: TC-TRANSFER-NFR-018

The code SHALL be formatted with rustfmt

Portability

Non-Functional Requirement: Cross-Platform Support NFR-TRANSFER-006
status: approved
tags: transfer, portability
priority: must
release: v1.0
is tested by: TC-TRANSFER-NFR-004

Support macOS, Windows, Linux

Scalability

Non-Functional Requirement: Large File Support NFR-TRANSFER-019
status: approved
tags: transfer, scalability
priority: should
release: v1.0
is tested by: TC-TRANSFER-NFR-019

The system SHALL handle files up to 100GB in size

Non-Functional Requirement: Streaming Architecture NFR-TRANSFER-020
status: approved
tags: transfer, scalability, performance
priority: must
release: v1.0
is tested by: TC-TRANSFER-NFR-020

Chunk operations SHALL use streaming architecture to handle files larger than available RAM

Non-Functional Requirement: Concurrent Chunk Processing NFR-TRANSFER-021
status: approved
tags: transfer, scalability, performance
priority: could
release: v1.0
is tested by: TC-TRANSFER-NFR-021

The system SHOULD support concurrent chunk verification to improve performance

Security & Privacy

Non-Functional Requirement: Privacy Guarantee NFR-TRANSFER-003
status: approved
tags: transfer, privacy, security
priority: must
release: v1.0
is tested by: TC-TRANSFER-NFR-005

All data stays on local/removable media; no network calls

Non-Functional Requirement: Cryptographic Agility NFR-TRANSFER-022
status: approved
tags: transfer, security, crypto-agility
priority: must
release: v1.0
is tested by: TC-TRANSFER-NFR-022

The system SHALL be designed for cryptographic agility: hash algorithms are pluggable via a common trait interface, enabling adoption of new standards (e.g., post-quantum algorithms) without architectural changes.

Deployment

Non-Functional Requirement: Offline Functionality NFR-TRANSFER-004
status: approved
tags: transfer, offline
priority: must
release: v1.0
is tested by: TC-TRANSFER-NFR-003

100% functional offline

Non-Functional Requirement: Air-Gap Deployment NFR-TRANSFER-005
status: approved
tags: transfer, deployment, offline
priority: must
release: v1.0
is tested by: TC-TRANSFER-NFR-006

Build and run on systems with no internet access

v1.1 — SBOM-Aware Transfer Manifests

The following requirements are planned for v1.1 and are not in scope for the MVP release.

Requirement: Reference SBOM in Transfer Manifest FR-TRANSFER-048
status: proposed
tags: transfer, v1.1, sbom
priority: could
release: v1.1

When a CycloneDX SBOM file (sbom.cdx.json) is present among the files being transferred, the transfer manifest SHALL include an sbom field referencing the SBOM filename.

Requirement: Log SBOM in Transfer Audit Trail FR-TRANSFER-049
status: proposed
tags: transfer, v1.1, sbom, audit
priority: could
release: v1.1

The system SHALL log the presence and filename of any SBOM file in the transfer audit trail, providing chain-of-custody documentation for compliance purposes.

v1.2 — Authenticated Encryption (AEAD) for Chunks at Rest

The following requirements are planned for v1.2 and are not in scope for the MVP release. These address the threat of USB interception by providing encryption at rest for chunk data and tamper detection for the transfer manifest.

Requirement: Optional AEAD Encryption of Chunks FR-TRANSFER-050
status: proposed
tags: transfer, v1.2, encryption, aead, security
priority: should
release: v1.2

The system SHALL support optional authenticated encryption of chunk data using an AEAD construction. When a user provides a passphrase via --passphrase (interactive prompt) or --passphrase-file (read from file), all chunk data SHALL be encrypted during pack and decrypted during unpack. When no passphrase is provided, the system SHALL behave identically to v1.0 (plaintext chunks with checksum verification).

Requirement: AEAD Algorithm Default and Agility FR-TRANSFER-051
status: proposed
tags: transfer, v1.2, encryption, aead, crypto-agility, security
priority: should
release: v1.2

The default AEAD algorithm SHALL be ChaCha20-Poly1305. The system SHALL support algorithm selection via --aead-algorithm CLI flag. The AEAD module SHALL use a trait-based interface consistent with the existing HashAlgorithm trait pattern (FR-TRANSFER-047), enabling future algorithm adoption without architectural changes.

Requirement: Passphrase-Based Key Derivation FR-TRANSFER-052
status: proposed
tags: transfer, v1.2, encryption, key-management, security
priority: should
release: v1.2

The system SHALL derive encryption keys from user-provided passphrases using a memory-hard key derivation function (Argon2id recommended). KDF parameters (algorithm, memory cost, time cost, salt) SHALL be recorded in the manifest so the unpack operation can reproduce the same derived key.

Requirement: Unique Nonce Per Chunk FR-TRANSFER-053
status: proposed
tags: transfer, v1.2, encryption, aead, security
priority: must
release: v1.2

Each chunk SHALL be encrypted with a unique nonce. Nonces SHALL be stored alongside chunk metadata in the manifest. Nonce reuse across chunks with the same key SHALL be treated as a fatal error.

Requirement: Manifest Authentication via Keyed MAC FR-TRANSFER-054
status: proposed
tags: transfer, v1.2, encryption, authentication, security
priority: should
release: v1.2

When AEAD encryption is enabled, the manifest SHALL be authenticated using a keyed MAC (HMAC-SHA256, KMAC, or BLAKE3 keyed mode) derived from the same passphrase. The manifest SHALL remain human-readable (unencrypted JSON) but SHALL include a MAC field that the unpack operation verifies before processing any chunks. Verification failure SHALL abort the unpack operation.

Requirement: Record Encryption Metadata in Manifest FR-TRANSFER-055
status: proposed
tags: transfer, v1.2, encryption, manifest, security
priority: should
release: v1.2

When encryption is enabled, the manifest SHALL record: the AEAD algorithm used, the KDF algorithm and parameters (excluding the passphrase), per-chunk nonces, and the MAC algorithm used for manifest authentication. This metadata SHALL be sufficient for the unpack operation to decrypt and verify without out-of-band configuration.

Non-Functional Requirement: Passphrase Handling Security NFR-TRANSFER-023
status: proposed
tags: transfer, v1.2, encryption, security, privacy
priority: must
release: v1.2

The system SHALL NOT write passphrases or derived keys to disk, logs, or the manifest in plaintext. Passphrases SHALL be read from an interactive terminal prompt (with echo disabled) or from a file descriptor, and SHALL be zeroized from memory after key derivation completes.

Error Handling

Scenario

Behavior

Insufficient USB capacity

Warn user, suggest smaller chunk size or larger USB

Missing chunks during unpack

List missing chunks, abort with clear error

Checksum mismatch

Identify corrupted chunk, abort with error

Disk full during pack

Stop operation, clean up partial chunk

Permission denied

Clear error message with required permissions

USB disconnected during operation

Detect failure, allow resume from last completed chunk

Appendix: Chunk Format Specification

Manifest Structure

{
  "version": "1.0",
  "operation": "pack",
  "source_path": "/path/to/source",
  "total_size_bytes": 10737418240,
  "chunk_size_bytes": 1073741824,
  "chunk_count": 10,
  "hash_algorithm": "sha256",
  "chunks": [
    {
      "index": 0,
      "filename": "chunk_000.tar",
      "size_bytes": 1073741824,
      "checksum": "sha256:abc123...",
      "status": "completed"
    }
  ],
  "created_utc": "2026-01-04T12:00:00Z",
  "last_updated_utc": "2026-01-04T12:15:00Z"
}

The hash_algorithm field identifies which algorithm was used. The checksum value prefix (e.g., sha256:) is redundant but kept for readability when inspecting manifests manually.

Chunk Naming Convention

  • Format: chunk_XXX.tar where XXX is zero-padded chunk index

  • Manifest: airgap-transfer-manifest.json