Calls: four MLS kinds and the call key in the client; coturn in the NixOS module; v0.3.0 #28
Reference in New Issue
Block a user
Delete Branch "feature/call-kinds"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Calls, the client's part (Amicitia F36;
.agents/features/call-kinds.md), and coturn for the relay's host.docs/PROTOCOL.md§4):call{id, video, sdp, key, at},callAnswer{id, sdp},callIce{id, candidates},callEnd{id, seq, reason, seconds}. OnlycallEndhas aseq, so an older client shows it as update the app and drops the rest.offer_call,answer_call,call_candidates,end_call; eventsCallOffered,CallAnswered,CallCandidates,CallEnded;ClientError::BadCall. Live calls are kept in memory only, at most 8.CallIdandCallKey.CallKey'sDebugprints nothing.turn.coturn.{enable, realm, minPort, maxPort, externalIp, allowedPeerIps}runs coturn with the relay's secret (a systemd credential, never in the store). It has no log, TLS and DTLS off, and private and reserved peers denied, and it opens 3478 and 49152–49999. Caddy's globallogFormatis nowlib.mkDefault, so .217's"level ERROR"no longer needsmkForce.Nix checks on the hub: run r1grtnrqrb580. The self-review is posted below.
Self-review (CLAUDE.md §3, adversarial).
Evidence
cargo test --workspace: client 87 (76 before: 8 intests/calls.rs, 3 unit), protocol 21 (+1), relay 57 (unchanged).cargo clippy --workspace --all-targets -D warningsis clean, andcargo fmttoo.a_second_offer_under_a_live_id_…fails.a_blocked_contacts_call_does_not_ringfails.malformed_call_kinds_are_dropped_…fails.real_relay.rs: the call's SDP, a candidate's address, the id and the key are in no byte of the real relay's database.relay-keeps-no-addresswith coturn, both exit 0. coturn relayed uclient's packets to a peer with a pair from the relay, and refused a wrong password. The client's address is in no journal line and no file under /var/log, /run/coturn, /run/turnserver or /tmp.Cannot complete Allocation, noterror 401.The test now reads the last count and takes either wording, and it prints uclient's output into a failing assertion, because Nix keeps only 25 lines.
Findings
calloffer, notexport_secret("amicitia call v1", id). Both are equally secret, since only the two members open MLS messages, and both are post-quantum exactly when MLS is. The exporter, though, gives different keys whenever one side has processed a commit the other hasn't. Today there is one epoch, but a key update, the move to X-Wing or a second device would make frames silently fail to open. The F36 doc in Amicitia must say so (I'll update it there).Outgoingkept in Amicitia's outbox and delivered again after a crash can deliver a stalecalllate, so the callee's app must ring only whenatis recent.atis the caller's clock, unchecked by the client.failed.Event'sDebugshows the SDP and candidates, as it shows a text's words. An app must not log events. Not changed here.externalIp) on .217.Privacy: nothing new reaches the relay (four more kinds of sealed blob). coturn sees both devices' addresses during a call, keeps no log, and the VM test greps the journal, /var/log, /run/coturn, /run/turnserver and /tmp for the client's address.
@@ -204,0 +227,4 @@video: bool,sdp: String,key: CallKey,at: i64,Finding 2: the caller's clock, unchecked. The app rings only when it is recent; a stale offer redelivered from an outbox must show as missed.
@@ -428,2 +528,4 @@/// Send receipts and report the other side's (reciprocal). On by default.receipts: bool,/// Calls in progress: in memory only, never in a snapshot.calls: Vec<LiveCall>,Finding 3: in memory only. An unload in Amicitia (a failed save, an erase, a new identity) mid-call drops it.
@@ -683,0 +818,4 @@}let index = self.index_of(contact)?;let id = CallId::from_bytes(self.random()?);let key = CallKey::from_bytes(self.random()?);Finding 1: the key is made here and sent inside the MLS-sealed offer, not derived from the exporter, so a commit on one side only can't make the two keys differ.
@@ -18,0 +19,4 @@# coturn with the same secret. The test network is private, so the client's range is let through here;# every other private range stays denied.turn.coturn.enable = true;turn.coturn.allowedPeerIps = [ "192.168.1.0-192.168.1.255" ];Finding 5: the test allows its own range, so the denied list itself is not exercised here.
Merged into main as
2215e8d(--no-ff; the remote hash was checked) and tagged v0.3.0. Its tree is the one Nix run r1grtnrqrb580 tested (1b15845).Pull request closed