Skip to content
hbs-tool.
Documentation05 of 07

Security model

The .hbs v2 envelope, the binary keyslot, and the honest limits of the sealed-report design.

≈ 1 min read

.hbs v2 envelope (93-byte header, little-endian)

0   4   magic "HBS2"
4   2   version (u16 = 2)
6   1   suite (0 = X25519+HKDF-SHA256+ChaCha20-Poly1305, 1 = …+AES-256-GCM)
7   2   key_id (u16)
9   16  extractor_id
25  16  scan_id
41  32  ephemeral X25519 public key
73  12  nonce
85  8   ciphertext length (u64)
93  ..  AEAD(zstd(report JSON)) + 16-byte tag
  • The entire header is AEAD AAD → tampering with routing fails authentication.
  • key = HKDF-SHA256(X25519(eph, recipient), salt = scan_id||eph_pub, info = "HBS-report-v2"||suite||key_id_le||extractor_id).
  • The dashboard keeps a bounded HBS1 ingest path for migration only and never issues v1.

Keyslot (512 bytes, patched per issuance)

Magic HBSKSLOT, version, flags, key id, campaign/extractor IDs, issued/expiry timestamps, 32-byte recipient public key, zero pad, SHA-256 checksum. Strict validation rejects absent/duplicate slots, nonzero flags/reserved/pad, nil IDs or key, and issued_at >= expiry. The checksum detects corruption, not trust.

Self-diagnosing report

  • results[] - status, severity, evidence, location, repro, impact, recommendation, references, fallbackLog, evidenceBlocks, runContext.
  • selfAudit.attempts[] - every file read / command / registry / API query with kind, redacted source, status, exitCode, bytes, durationMs, and evidenceRef linking a finding to the log line that produced it.
  • diagnostics - environment/hypervisor, catalog fingerprint, privilege, peak RSS, phase durations, missingData, and a bounded human-readable log.
  • All strings are redacted and size-bounded before sealing.

Honest security statement

Sealed reports provide confidentiality and integrity under modern, audited cryptography (X25519, HKDF-SHA256, ChaCha20-Poly1305 or AES-256-GCM) assuming the dashboard's private keys stay protected, the OS RNG is sound, and endpoint memory is secure. We make no "unbreakable" claim. The extractor binary contains only a public key and cannot decrypt anything; a binary cannot be encrypted while still executable, so its logic remains reverse-engineerable despite stripping and obfuscation.