Repository navigation
Conversation
…secure channel spec Adds the trust anchor and the contract of the end-to-end encrypted channel (epic #44, phase 1): - DeviceIdentity (X25519 public key and key ID) in SystemState and in the answer to the new EnrollClientKeyCommand, with ClientKind (HUB reserved). - PairedPhone.remote_key_enrolled and remote_key_label. - docs/secure-channel.md: Noise_IK_25519_ChaChaPoly_BLAKE2s, prologue, frame format, replay window, session rules, identity and authorization. - [secure_channel] constants in transport.toml. - docs/secure-channel-vectors.json and the script that generates them with the noiseprotocol reference implementation. Closes #45 Closes #46 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XkZEiWM4SEVB1xBTaoykRa
|
The latest Buf updates on your PR. Results from workflow Proto Check / check (pull_request).
|
This was referenced Dec 1, 2026
Open
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.
Requested by Michaël · project thread
What and why
Phase 1 of the epic #44 (keys and secure channel), contracts side. Closes #45 and #46 in one PR, since the firmware and the app need both to implement and test the channel.
#45, keys over BLE (
system.proto, append-only):DeviceIdentity { public_key, key_id }, reported inSystemState.device_identity(field 10, BLE only) and inSystemCommandResult.device_identity(field 5).EnrollClientKeyCommand { public_key, kind, label }(SystemCommandfield 14) andClientKind(PHONE;HUBreserved and refused for now). BLE only, validated phone only, re-enrolling replaces the key; revocation is documented in the comments.PairedPhone.remote_key_enrolled(4) andremote_key_label(5, so the phone list can show the label the issue mentions).mqtt_client_idis not deprecated here, as the issue says (that comes with the relay).#46, the channel spec:
docs/secure-channel.md, a[secure_channel]section intransport.tomlwith its constants,docs/secure-channel-vectors.json, and the generatortools/secure_channel_vectors.py(Pythonnoiseprotocol0.3.1, run withpython -I, deterministic output). README links the doc.Choices the issue left open (please check)
5(type + session ID, nothing else) answered to a transport frame for a session the device doesn't have. It is unauthenticated, so the client treats it as a hint and keeps its old session until a new handshake completes. It reveals nothing (session IDs are random) and is smaller than what triggered it.opencar/secure/1+0x00+ the key ID in ASCII. Transport messages use empty associated data (the counter is the nonce, and each session has its own keys).Checklist
buf format,buf lintandbuf breaking --against '.git#branch=main'passSource of the data
The vectors come from the
noiseprotocolreference implementation, with fixed static and ephemeral keys.Generated by Claude Code