Repository navigation
docs(rfc): draft RFC 0003 -- Phase 1 SSH stack greenfield vs russh - #28
Merged
Merged
Conversation
Proposes the foundational decision for Phase 1's SSH-2 transport, KEX, authentication, and channel layers. Three options analysed against the five MANIFIESTO commitments and threat-model §3.2.6: A. Greenfield-modular on audited primitive crates (chosen). B. russh with maximum mitigations (named fallback). C. Hybrid -- ssh-key for authorized_keys parsing only. A wins on MANIFIESTO #1 (memory safety), #3 (zero legacy), #4 (small surface), on threat-model containment, and on cargo audit cleanliness. The only dimension where B won -- the README's old 'Phase 1 takes weeks' commitment -- no longer exists after PR #25 removed per-phase calendar estimates on 2026-05-27. The decision is RFC-level (not ADR-level) because Phase 1's foundation determines what code runs in QuantumSSH's pre-auth path for the lifetime of the project; reversing later costs an order of magnitude more than choosing once. Four follow-up ADRs become unblocked when this RFC merges (workspace topology, unsafe_code forbid promotion, ML-KEM crate selection, CI interop hard gate). Source material: claudedocs/phase1-open-decisions.md (2026-05-13) adversarial panel analysis with external citations. This RFC is the public, normative version of that analysis. Roadmap issue: #9 (Phase 1 / Hito 1).
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds draft RFC-0003 to formalize the Phase 1 SSH-2 stack decision (greenfield-modular implementation over depending on russh), and records the draft in the project changelog.
Changes:
- Add
docs/rfcs/0003-phase-1-ssh-stack-greenfield-vs-russh.md(Draft) describing options A/B/C and proposing greenfield-modular as the default. - Update
CHANGELOG.mdto include an[Unreleased] -> Addedentry for RFC-0003.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/rfcs/0003-phase-1-ssh-stack-greenfield-vs-russh.md | New draft RFC documenting the Phase 1 SSH stack decision and rationale. |
| CHANGELOG.md | Adds an entry under Unreleased/Added documenting the new RFC draft. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Draft RFC formalising the foundational choice for Phase 1's SSH-2 layers: implement transport, KEX, authentication, and channel layers greenfield on audited cryptographic primitive crates, rather than depend on
russh.Three options analysed:
ml-kem,x25519-dalek,ed25519-dalek,chacha20poly1305,aes-gcm,sha2,hmac— proposed.russhwith maximum mitigations — documented fallback if a future constraint forces the trade.ssh-keyforauthorized_keysparsing only, greenfield everything else.The decision is RFC-level (not ADR-level) because Phase 1's foundation determines what code runs in QuantumSSH's pre-auth path — the highest-trust surface in the system — for the lifetime of the project.
Why now
The
README.md§Roadmap Phase 0 entry records a "tentativelyrussh; formal RFC pending" commitment. Phase 1's tracking issue #9 cannot begin in earnest without resolving this — the first crate'sCargo.tomlsettles the choice for the duration of the phase.The only dimension where
russhclearly won the prior analysis was the README's old "Phase 1 takes weeks" commitment. PR #25, merged on 2026-05-27, removed per-phase calendar estimates in favour of "each phase ships when it is ready, not on a calendar." That removed the load-bearing argument forrusshand made it correct to revisit.How the decision was reached
The full evidence — six adversarial agent positions (RUSSH-PRO, RUSSH-CON, ML-KEM, WORKSPACE-TOPOLOGY, SCOPE-EXEC, INTEROP), eight-row dimension table scored against the MANIFIESTO, external citations, cost estimates — lives in
claudedocs/phase1-open-decisions.md§"Decisión 1" (dated 2026-05-13). The RFC is the public, normative synthesis of that analysis. The claudedocs file remains a working-notes artefact, not part of the RFC's canonical record.Adversarial verdict: A wins 6 of 8 dimensions (MANIFIESTO #1 memory safety, #3 zero legacy, #4 small surface, correctness-over-cleverness, threat-model containment of RFC-0001 §3.2.6,
cargo auditcleanliness). The two non-A wins are "we don't invent crypto" (a tie — both options re-use audited primitives) and the now-defunct calendar promise.Follow-ups this RFC unblocks
If accepted, four ADRs become writable (numbering assigned at merge per
docs/adr/README.md):crates/quantumsshbinary +crates/quantumssh-corelibrary).unsafe_code = \"forbid\"workspace-wide promotion.RustCrypto/ml-kem0.3.0 as the ML-KEM-768 implementation, withlibcrux-ml-kemas named fallback.Plus a small follow-up PR to
README.mdupdating the Phase 0 roadmap entry from "tentativelyrussh" to "greenfield-modular per RFC-0003". Not bundled here — one decision per PR.Comment period
Per
docs/rfcs/README.md§5, this RFC stays open for at least 14 days before merge. The 14-day window ends ~2026-06-10. Decided by lazy consensus per §"Decision rule": absent a substantive unresolved objection from a maintainer at the end of the comment period, the RFC is accepted.Test plan
docs/rfcs/0003-phase-1-ssh-stack-greenfield-vs-russh.md(new, ~270 lines) andCHANGELOG.md(one bullet under Added).docs/rfcs/0000-template.md(Summary, Motivation, Guide-level, Reference-level, Drawbacks, Rationale and alternatives, Prior art, Unresolved questions, Future possibilities).Roadmap issue:field cites#9per the convention introduced in PR #25.