Skip to content

feat(transport): persistent coordinator key via atlas-vault, size-bucket padding on every record (F6) - #23

Merged
aien-spark merged 1 commit into
mainfrom
feat/coordinator-key-padding
Oct 16, 2026
Merged

aien-spark merged 1 commit into
mainfrom
feat/coordinator-key-padding

Conversation

@aien-spark

@aien-spark aien-spark commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Evidence

  • cargo test --workspace: 129 passed, 0 failed, 2 ignored (11 of them new in this PR).
  • cargo audit: exit 0, no advisories.
  • cargo fmt --check clean on changed files; no new clippy warnings.
  • Smoke run: two oh-coordinator starts with --key-from-vault oh-test --vault-bin <stand-in script> both printed the same coordinator key 03a107bf.... With the real ~/.local/bin/atlas-vault the coordinator stops with a clean error: on this Spark the vault binary itself fails to start (missing shared library libKGENCompilerRTShared.so, exit 127), so the real vault is untested.

What changed

  1. Persistent coordinator key (crates/oh-coordinator/src/identity.rs). --key-from-vault <NAME> runs atlas-vault get <NAME> (--vault-bin <path> overrides the program), reads exactly 64 hex characters into memory, rebuilds the key with new beacon_core::Keypair::from_seed (ed25519-dalek SigningKey::from_bytes), and zeroizes the seed buffers. The seed is never written to disk, printed or logged; errors never quote it. Default (fresh in-memory key) unchanged; the coordinator key <hex> line is unchanged so the demo scripts still parse it, and a new coordinator key source: line follows. The run id now also mixes in 16 OsRng bytes so a restart with the same key still gets a new run id.
  2. Size padding (crates/oh-core/src/transport.rs). Record plaintext is data_len[4 BE] || data || zeros, padded to the next power of two, min 1 KiB, max 64 MiB; longer flushes split. Receiver refuses records outside 1 KiB..64 MiB and, after opening, a length field past the end, a bucket that is not the smallest fit, or nonzero padding; the stream then closes. Version tag OHSEC001 -> OHSEC002.
  3. Timing padding: documented as not built. README and design doc updated.

Tests added

transport: bucket sizes; 7 B and 900 B (and 3000/4000 B) give identical ciphertext lengths; exact round trip at bucket edges and 70 kB; malformed padding (length past end, nonzero pad byte, oversized bucket) rejected with a control that the honest encoding opens; record below 1 KiB rejected. identity: seed hex stable, bad seeds refused without echo, missing/failing vault errors, stand-in vault script round trip. lib: same key across two starts keeps pubkey, changes run id. beacon-core: from_seed stable and signs.

Zero secrets certification: no keys, tokens or seeds written to files (the test seed is a public fixture, 00..1f).

🤖 Generated with Claude Code

…t) and pad every record to a size bucket

cargo test --workspace: 129 passed, 0 failed, 2 ignored. cargo audit: exit 0.

- oh-coordinator --key-from-vault <NAME> [--vault-bin <path>] runs
  `atlas-vault get <NAME>`, reads a 64 hex character seed into memory,
  rebuilds the Ed25519 key with beacon-core Keypair::from_seed and wipes
  the seed. Never written to disk, printed or logged. Default (fresh
  in-memory key) unchanged. Run id now mixes in 16 random bytes so it
  still differs per start.
- Transport records now carry data_len[4] || data || zeros, padded to the
  next power of two (1 KiB to 64 MiB). Receiver refuses wrong length
  field, wrong bucket or nonzero padding. Version tag OHSEC002.
- Timing padding documented as not built.

Co-authored-by: Drake Stapleton <drake@aien.org>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

⚖️ Sovereign Code Review & Alignment Gate

Greetings @aien-spark. I am AIEN, the automated review gate for the AIENOS project.

Your pull request #23 ("feat(transport): persistent coordinator key via atlas-vault, size-bucket padding on every record (F6)") has undergone automated auditing against the project standards.

✅ Doctrine Diff Audit: PASS

  • Telemetry Check: Clean (zero tracking or surveillance hooks detected).
  • Sovereign Voice & Formatting Check: Clean (zero em/en dashes, zero banned buzzwords).
  • Secrets & Credentials Check: Clean (zero plaintext secrets, hardware vault only).
  • Status: Project standards verified.

🌿 Sovereign Steward: Contributor Alignment Interview

Greetings @aien-spark. I am AIEN, the automated steward for the AIENOS project.

We welcome all contributors who share our commitment to open collaboration, global humanity, and disciplined systems craftsmanship. We build to expand computing capability, advance open-source intelligence, and share technology freely with the world.

Your pull request #23 ("feat(transport): persistent coordinator key via atlas-vault, size-bucket padding on every record (F6)") is ready for stewardship alignment.

Please respond directly to these four alignment inquiries:

  1. Long-Term Mission Alignment:
    This initiative is an enduring engineering commitment to open-source technology for humanity, not a vehicle for short-term hype, social media monetization, or get-rich-quick ventures. How does your contribution support global progress and the resilience of local communities?

  2. Telemetry & Integrity:
    Do you certify that this change introduces zero telemetry, zero surveillance, and zero artificial paywalls?

    "I certify that my contribution is submitted in service of human sovereignty and open collaboration. I affirm that this work maintains zero telemetry, contains no surveillance backdoors, and introduces no artificial barriers, and that I offer it under AGPL-3.0-or-later, the license that governs this project. I build so that intelligence is owned by the person who runs it, not rented."

  3. Downstream Heritage Preservation:
    Do you acknowledge and agree that any downstream branch, fork, or copy of this work remains under AGPL-3.0-or-later and retains the project's license and attribution notices, as the LICENSE file requires?

  4. Craftsmanship & Native Discipline:
    What architectural trade-offs did you make, and how did you verify that this code introduces zero regressions, zero unneeded dependencies, and complies with our pure native compiled standards?


Reply to this comment with your affirmation. Once verified against the project standards, I will grant the sovereign-interview-passed clearance. For direct sovereign coordination: Drake Stapleton (drake@aienos.com) and AIEN (aien@aienos.com)

@github-actions github-actions Bot added needs-testimony Contributor testimony required sovereign-audit-passed Constitutional diff audit passed labels Oct 16, 2026
@aien-spark
aien-spark merged commit a244b46 into main Oct 16, 2026
3 checks passed
@aien-spark
aien-spark deleted the feat/coordinator-key-padding branch October 16, 2026 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-testimony Contributor testimony required sovereign-audit-passed Constitutional diff audit passed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants