Expand description
Canonical at-record subject + keyed group-scoped routing leaf (EV3, epic #600).
Replaces the unkeyed 64-bit oid_hash/publication_broadcast_path (in
crate::moq_event) with a construction that is:
- Canonical — a record addressed three ways (handle vs DID, NSID case, trailing fragment) hashes to exactly one value.
- Keyed — the routing leaf is a PRF of
(K_group, subject, epoch), so knowing the at-uri is NOT enough to derive the topic (confidentiality of the subject against the relay).K_groupis the PRF key. - Epoch-rotated — rotating the group key (EV2’s
GroupKeyRegistry) rotates every leaf, giving cross-time unlinkability.
The leaf is a MoQ-path-safe (hex) segment; the semantic topic name moves
UNDER the payload AEAD (see crate::crypto::event_crypto), with the AAD
binding the keyed leaf + epoch so cross-topic/cross-epoch ciphertext replay
is rejected.
Lexicon: events address records by their atproto collection NSID. The formal
ai.hyprstream.event.* lexicon is a separate follow-up; this module is
NSID-agnostic (takes the NSID as a validated string).
Structs§
- Canonical
Subject - A canonical at-record subject: the publishing/owning DID, the collection NSID, and the record key (rkey).
Functions§
- keyed_
broadcast_ path - Full broadcast path:
{prefix}/{topic_leaf}. Defaults to the publications prefix used by the per-OID firehose tier; pass a group-scoped prefix for the confidential profile. - keyed_
broadcast_ path_ with keyed_broadcast_pathwith an explicit prefix (e.g. a group-scoped path for the confidential profile, vs the public firehose prefix).- resolve_
handle_ to_ did - Resolve a bare handle (e.g.
alice.example.com) to a DID. - topic_
leaf - The keyed routing leaf for a subject under a group key + epoch.