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.
Key Architectural Outcomes & Takeaways
Strict two-person rule enforcement for private key release and signing.
Hardware SHA-256 and Ed25519 hash validation before payload flashing.
Auditable air-gap USB bridging protocol preventing network lateral movement.
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.
+---------------------+ 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
- Air-Gapped Signing Machine: Dedicated Linux workstation with WiFi, Bluetooth, and microphone physically removed from the motherboard.
- Hardware Security Module: YubiKey 5 NFC FIPS or Nitrokey Storage.
- 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:
# 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:
# 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
# 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/zeroimmediately following each signing ceremony.