SOP Distributed Cloud & Security Intermediate Level PP-KB-004

Standard Operating Procedure: Air-Gapped Firmware Cryptographic Signing

Step-by-step SOP for provisioning air-gapped hardware security modules and executing multi-party cryptographic signing ceremonies for secure edge boot.

Joey Jones
Joey Jones Principal Edge Architect
Estimated Read 6 min read
Last Verified 2026-10-19
Corpus Status Production Edge

Key Architectural Outcomes & Takeaways

01

Strict two-person rule enforcement for private key release and signing.

02

Hardware SHA-256 and Ed25519 hash validation before payload flashing.

03

Auditable air-gap USB bridging protocol preventing network lateral movement.

04

Cryptographic rollback protection counter verification in secure boot ROM.

#Purpose & Scope

This Standard Operating Procedure governs the cryptographic authorization and release of all microcontroller and edge gateway firmware. Under no circumstances may an unsigned binary image be distributed to field production devices.

CODE
+---------------------+     Write-Once USB (Read Only)     +------------------------+
| Untrusted CI Runner | =================================> | Air-Gapped Station     |
| (Compiles Binaries) |      (Payload + Source Hash)       | (No WiFi, No Bluetooth)|
+---------------------+                                    +-----------+------------+
                                                                       |
                                                           YubiKey 5 FIPS HSM
                                                           (Dual Physical PINs)
                                                                       |
                                                                       v
+---------------------+     Verified Signed Image          +------------------------+
| Target Edge Devices | <================================= | Detached Signature     |
| (Secure Boot ROM)   |        (GPG / minisign / Ed25519)  | (.sig + Manifest)      |
+---------------------+                                    +------------------------+

#Required Equipment & Roles

  1. Air-Gapped Signing Machine: Dedicated Linux workstation with WiFi, Bluetooth, and microphone physically removed from the motherboard.
  2. Hardware Security Module: YubiKey 5 NFC FIPS or Nitrokey Storage.
  3. Personnel: Primary Custodian (Cryptographic Officer) + Secondary Witness (SRE Lead).

#Step-by-Step Signing Procedure

#Step 1: Binary Intake & Hash Verification

Insert the clean USB media containing the compiled firmware image (firmware-v2.4.0.bin) into the Signing Machine:

bash
# 1. Compute and log SHA-256 digest
sha256sum firmware-v2.4.0.bin > firmware.sha256
cat firmware.sha256

# 2. Confirm matching hash against the independent CI release audit manifest
cmp firmware.sha256 /mnt/manifest/expected_sha256.txt && echo "[PASS] Digest Matches"

#Step 2: Detached Hardware Signature Generation

Connect the YubiKey HSM. Both custodians must physically enter their respective PIN and pass-phrase:

bash
# 3. Generate Ed25519 signature via minisign / PKCS#11 engine
minisign -S -s /media/secure_keys/release_ed25519.key \
  -m firmware-v2.4.0.bin \
  -x firmware-v2.4.0.bin.sig \
  -c "Release v2.4.0 Authorized by Joey Jones & Elena Rostova"

# 4. Verify signature locally before transfer
minisign -V -p /etc/security/release_pubkey.pub \
  -m firmware-v2.4.0.bin \
  -x firmware-v2.4.0.bin.sig

#Step 3: Anti-Rollback Security Counter Update

bash
# Inject monotone hardware security counter into binary header
python3 -m espsecure v2 inject_security_version \
  --version 4 \
  firmware-v2.4.0.bin

#Security Rules

  • > [!CAUTION]

Never connect the Signing Station to any Ethernet port, cellular dongle, or wireless bridge.

  • > [!IMPORTANT]

USB flash drives used for binary transfer must be reformatted with dd if=/dev/zero immediately following each signing ceremony.

#Verification Checklist

Dual-custody physical presence logged in physical station book.
SHA-256 hash verified byte-for-byte against air-gap manifest.
Signature output confirmed valid with public verification key.
Flash media securely wiped post-transfer.
Back to Knowledge Catalog
How to build habit in 30 days with Linda ?
Mike Hardson Episode 12 . Industrial Revolution
00:00
00:27