Skip to content

comanderanch/hashkey-airgap

Repository files navigation

Hashkey Air Gap

Networkless Secure Data Transfer — Flash Drive Protocol

Author: Anthony Hagerty — Haskell Texas

Version: 1.0.0 — March 15 2026


What This Is

Physical flash drive data transfer with three factor hardware security.

No network required at any point. Drive authorizes specific machines. Compiler installs once — reusable. Data readable only on authorized hardware. Wrong machine gets noise. Nothing else.


Requirements

  • Python 3.8 or higher
  • USB flash drive or any writable directory
  • Linux / Mac / Windows with WSL

No pip dependencies. All standard library.


Installation

git clone https://github.com/comanderanch/hashkey-airgap
cd hashkey-airgap

Quick Start — Create a Drive Package

Step 1 — Prepare your data

{
  "message": "data to transfer via flash drive",
  "operation": "your operation here"
}

Step 2 — Create drive package

python airgap_creator.py data.json /media/your-usb

Replace /media/your-usb with your flash drive path.

On Linux flash drives typically mount at:

/media/username/DRIVENAME
/mnt/usb

On Mac:

/Volumes/DRIVENAME

Output:

Drive ID generated
Fold sealed — 89 bits
Drive registry created
Max 2 machines can authorize

Step 3 — Hand drive to recipient

Physical delivery. No network. Nothing to intercept.


Receiving — First Time on New Machine

Insert flash drive. Navigate to drive:

cd /media/your-usb

Install compiler to this machine:

python ~/hashkey-airgap/airgap_drive.py install

Output:

Machine registered to drive
Machine ID: abc123...
Slot 1 of 2

Open the fold:

python ~/hashkey-airgap/airgap_drive.py open

Output:

Drive authorized — machine confirmed
Fold opened — 89 bits
Full payload visible

Drive is NOT burned. Reusable on this machine.


Receiving — Returning Machine

Already installed. Just open:

cd /media/your-usb
python ~/hashkey-airgap/airgap_drive.py open

No reinstall needed. Instant access.


Updating Fold — Same Drive New Data

No need for a new drive. From any authorized machine, inside the drive directory:

python ~/hashkey-airgap/airgap_drive.py update new_data.json

Output:

Fold updated — no new drive needed
New strand: 89 bits
Payload hash: xyz789...

Security Behavior

Wrong machine — unauthorized

Drive inserted in unknown machine. Drive checks registry. MAC not found.

Result:

Machine NOT authorized for this drive
Fold will not open
Drive appears inert to attacker

Stolen drive — no authorized machine

Attacker has drive but not authorized hardware. No fold access possible. Drive is inert. Data does not exist without the machine it was written for.

Drive at capacity

Drive allows 2 machines by default. Third machine tries to install:

Drive at capacity — 2 machines max
Cannot authorize new machine

Contact originator for new drive.


Three Factor Security

Factor 1 — Drive ID Sealed at creation. Unique per drive package. Wrong drive = blocked.

Factor 2 — Machine MAC Registered at first install. Compiler tied to MAC + Drive ID. Wrong machine = blocked.

Factor 3 — DNA Token Structure Payload encoded in 6-base pair fold. 89-bit strand. Without matching tokenizer = noise. Data does not exist without the system it was written for.

All three required simultaneously. No single factor is sufficient.


Drive Status

Check current drive state:

cd /media/your-usb
python ~/hashkey-airgap/airgap_drive.py status

Output:

== DRIVE STATUS ==
  Drive ID:     abc123...
  Strand:       89 bits
  Max machines: 2
  Authorized:   1
  Open count:   3

File Reference

airgap_creator.py     creates drive package from data
airgap_drive.py       install open update status on drive
data_to_fold.py       JSON → 89-bit fold strand
color_fold_encoder.py RGB fold encoder

Use With Bridge

To connect flash drives to network protocol: See github.com/comanderanch/hashkey-bridge

Bridge enables:

  • Network station authorizes drive
  • Drive fold injects to network pipeline
  • Network station issues trusted drives
  • Neither protocol modified

Related Projects

  • github.com/comanderanch/hashkey-standalone
  • github.com/comanderanch/hashkey-bridge
  • github.com/comanderanch/ai-core

License

MIT License — see LICENSE file Free to use, modify, and distribute with attribution.

Disclaimer

This software is provided as-is for research and testing purposes. See DISCLAIMER.md for full terms. Use at your own risk. Not affiliated with Anthropic. Independent research project. Anthony Hagerty — Haskell Texas — 2026

Author

Anthony Hagerty — Independent Systems Architect Haskell Texas — No retreat. No surrender.

About

Air gap flash drive protocol — three factor security — drive ID + MAC + DNA token — reusable authorized compiler — no network needed — isolated unit deployment

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages