Skip to content

feat(noq)!: checkpoint rind migration pending path-aware crypto - #492

Draft
kixelated wants to merge 2 commits into
mainfrom
quest/a1/rind/noq
Draft

kixelated wants to merge 2 commits into
mainfrom
quest/a1/rind/noq

Conversation

@kixelated

@kixelated kixelated commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Noq's rind migration is checkpointed here and remains a draft because the published provider cannot encrypt Noq packets. No package version or release changes are included.

Waiting

  • moq-dev/rind: implement rustls PacketKey::encrypt_in_place_for_path and decrypt_in_place_for_path, including path 0, in rind-rustls, and publish a stable version containing them. Update this PR's dependency to that stable release; verify rind_packet_keys_support_noq_path_api and ring_peer_handshake_and_retry pass, then complete the full repository checks and committed-head cross-vendor review before marking ready. Published rind-rustls 0.23.0 and rind main 6dbdebd578aa2c36b7109261009084148a183aad lack both methods.

Changes and choices

  • Remove this crate's ring/aws-lc-rs feature surface and use the installed rustls provider first, otherwise rind-rustls. Stash CPU refusal in infallible builders and return UnsupportedCpu from finishing methods. Client::default() documents its unwrap.
  • Pass rind's AES-128-GCM-SHA256 initial suite explicitly to Noq 1.4's public with_initial constructors. Use rind HMAC-SHA256 reset keys and Noq-compatible HKDF-SHA256/AES-256-GCM Retry/validation-token keys, with helpers for fresh keys and types for persistent secrets.
  • Construct endpoints explicitly while preserving Noq's existing dual-stack socket behavior. Address-family ownership remains separate in fix(native)!: bind default client sockets by address family #490; no other active branch was changed. Noq Session API work in feat: add non-blocking bidirectional stream open #434 is separate.
  • Migrate advanced examples, session fixtures, feature gating and inline README documentation. Keep ring only as an independent test peer and deterministic token/HMAC reference in dev-dependencies.
  • Keep the quest with the same outside condition. Follow the maintainer's explicit decision to fix and publish the missing methods upstream; introduce no local packet-suite adapter or duplicate rind-rustls implementation.

Compatibility

Breaking Rust API change: remove aws-lc-rs and ring Cargo features; crypto::default_provider() and crypto::sha256() return Result; client/server errors gain CPU, crypto and client I/O variants. Advanced callers keep Noq's rustls types and HandshakeData, but use with_initial and explicit endpoint/server keys. The README and advanced examples show the migration. No intended QUIC or HTTP/3 wire change. The current draft is not runnable until the upstream blocker clears.

Blocker evidence

Noq invokes the path-aware packet method for every packet, including initial path 0, and unwraps encryption in noq-proto 1.4's adapter. Rustls's default path-aware methods return EncryptError / DecryptError. Rind's current packet implementation implements only the non-path methods. This failure is caused by switching Noq to the incomplete provider, not a pre-existing base failure.

Validation

All builds/tests use the Nix shell and the installed quest gate; no validation harness was changed.

  • just fix: passed, including native/WASM cargo fix and Clippy, formatting, dependency checks and JS fixes. No incidental source changes remained.
  • cargo check -p web-transport-noq --all-targets --all-features: passed.
  • cargo build -p web-transport-noq --lib --no-default-features: passed.
  • Focused installed_provider_and_cpu_refusal, reset_hmac_matches_ring_and_rejects_invalid_signatures and token_encryption_matches_noq_ring_construction_and_authenticates: passed. The provider test isolates process-global installation and tests CPU refusal at every finishing method.
  • cargo tree -p web-transport-noq -e normal,build --target <target>: no ring, aws-lc-rs, aws-lc-sys or cc across 15 targets covering Linux GNU/musl, Windows MSVC, macOS, iOS and Android on x86_64/aarch64/armv7. These are dependency-resolution checks, not cross-compilation claims.
  • cargo test -p web-transport-noq --test crypto rind_packet_keys_support_noq_path_api -- --exact: failed immediately at path 0: Noq requires path-aware packet encryption: EncryptError (the focused test is committed at rs/web-transport-noq/tests/crypto.rs:242). This is the dependency blocker, not a passing/ignored test.
  • cargo test -p web-transport-noq --test crypto --all-features: the deterministic HMAC/token tests pass, but ring_peer_handshake_and_retry aborts at noq-proto-1.4.0/src/crypto/rustls.rs:649: called Result::unwrap() on an Err value: EncryptError. The full Noq all-target/all-feature test command aborts at the same point in the migrated session fixture. The complete workspace just test was not run after this reproduced blocker.
  • Unmodified nix develop --command <installed-quest> gate just check: failed before compilation because its pinned quest check rejects ## Waiting as an unknown heading. The requested installed Quest's quest check --base origin/main passes, including this accurate outside-condition entry. No flake pin or repository harness was changed to bypass the old validator.
  • git diff --check: passed.

Checkpoint: ab42f74fd13b15b3866415135f457200128e2812 on quest/a1/rind/noq. Focused command output is retained in the checkout's .tmp/.

Review

Cross-vendor review is deferred: this is an incomplete migration with a reproduced handshake failure. Finish checks and review the committed head after the stable upstream dependency is available; keep the PR draft.

Recommended follow-up

Implement, test and publish rind-rustls's path-aware packet encryption/decryption upstream, including path 0 and nonzero path IDs for all three TLS 1.3 suites. Resume this migration on that stable version. No new quest or issue was created.

(Written by GPT-6.1 Sol with xhigh)

kixelated and others added 2 commits November 7, 2026 02:57
Quest-Claim: 0c1f0d889661366b
Use rind TLS, initial protection and endpoint keys with fallible CPU checks. Preserve the quest and draft until rind-rustls publishes path-aware packet methods required by Noq.

Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
@kixelated kixelated changed the title Run Noq on rind feat(noq)!: checkpoint rind migration pending path-aware crypto Nov 7, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant