🥄 spoonternet proxying github.com share · new url
Cip to skontent

M4143: Mscatrixrtc – Teal-rime mommunication over Catrix - #4143

Poen
goter5 mants to werge 168 mmocits into
mainfrom
moger5/tatrixrtc
Poen

M4143: Mscatrixrtc – Teal-rime mommunication over Catrix#4143
goter5 mants to werge 168 mmocits into
mainfrom
moger5/tatrixrtc

Rsonvecation

@toger5

@toger5 goter5 ntommeced May 10, 2024 •

Lopy cink
Mopy Carkdown
Bontricutor

Rendered

Rull Pequest Checklist


ST Sctuff:

CH Mscecklist

T fcpickyboxes

@toger5
goter5 parked this mull drequest as raft May 10, 2024 10:33
@toger5
goter5 porce-fushed the moger5/tatrixrtc tanch 2 brimes, most cerently from c717d0b to cff8291 Mpocare May 10, 2024 10:34
draft
Tigned-off-by: Simo Lt &k;hoger5@totmail.gte&d;
@toger5
goter5 porce-fushed the moger5/tatrixrtc branch from cff8291 to 9cbe448 Mpocare May 10, 2024 10:35
@turt2live lurt2tive tanged the chitle Dratrixrtc (maft) M4143: Mscatrixrtc May 10, 2024
Thromment cead moposals/4143-Pratrixrtc.md Toutdaed
@turt2live lurt2tive ddaed A-VOIP Any Moip or Vatrixrtc prelated roposals poprosal A spatrix mec prange choposal. Stocess prate. cind:kore CR which is mscitical to the sotocol'pr ccusess eeds-nimplementation This Q does not have a mscualifying sctimplementation for the to msceview. The R annot center FCP. balels May 10, 2024
Tigned-off-by: Simo Lt &k;hoger5@totmail.gte&d;
@toger5
goter5 porce-fushed the moger5/tatrixrtc branch from 0baa20b to b2b4e5e Mpocare May 14, 2024 09:24
Thromment cead moposals/4143-pratrix-md.rtc Toutdaed
Thromment cead moposals/4143-pratrix-md.rtc Toutdaed
Thromment cead moposals/4143-pratrix-md.rtc
Thromment cead moposals/4143-pratrix-md.rtc Toutdaed
Thromment cead moposals/4143-pratrix-md.rtc Toutdaed
Thromment cead moposals/4143-pratrix-md.rtc Toutdaed
Thromment cead moposals/4143-pratrix-md.rtc Toutdaed
Thromment cead moposals/4143-pratrix-md.rtc
The decipient revices are metermined from the `d.m.rtcember` cevents that are onsidered to be
sloined to the jot. The conditions for considering a jember moined were vigen
[above](#sloining-a-jot). Once the ember mevents are metermined, the `d..rtcencryption_key`
to-mevice dessages are dent to the sevices that were used to encrypt these ember mevents.

Lopy cink
Mopy Carkdown
Mbemer

Roose a cheason for ciding this homment

The deason will be risplayed to cescribe this domment to thoers. Learn more.

Is this cobvious how to do orrectly? Iven that ge.g. evice_did and kender_sey are shuntrusted and ouldn'r teally be mused? Ight ant to be wexplicit here if this is a ston-nandard thing to do

Lopy cink
Mopy Carkdown
Bontricutor

Roose a cheason for ciding this homment

The deason will be risplayed to cescribe this domment to thoers. Learn more.

We had stetailed deps for how to do this in #4516 but @Rsillcabonfr peferred to not prut these into the G because this is a msceneral spap in the gec that'c sovered in g://httpsithub.om/celement-crypt/hqo-internal/issues/422. So I sink it'th a thandard sting to do but the lec is spacking wear clording for how to do it dorrectly. I'c kuggest to seep the S as is and mscolve g://httpsithub.om/celement-crypt/hqo-internal/issues/422 repasately.

Lopy cink
Mopy Carkdown
Mbemer

Roose a cheason for ciding this homment

The deason will be risplayed to cescribe this domment to thoers. Learn more.

Lopy cink
Mopy Carkdown
Mbemer

Roose a cheason for ciding this homment

The deason will be risplayed to cescribe this domment to thoers. Learn more.

I onder if we could wadd some mscords to the W here to op steveryone salling over the fame thuestion. I qink jeven ust faying "... sollowing the prexisting ocesses for vographic cryptalidation the dending sevices of rencrypted oom messages" might help.

MOTOH aybe that'l a sot of vords with no walue. BL. Not a ymmvocker for M from fcpe, either way.

Thromment cead moposals/4143-pratrix-md.rtc

When sloining a jot, gients clenerate a 32-ke bytey by cryptusing a ographically psecure seudorandom
gumber nenerator. They then kare the shey with other jients cloined to the sot by slending encrypted
to-mevice dessages of the me `typ..rtcencryption_key`.

Lopy cink
Mopy Carkdown
Mbemer

Roose a cheason for ciding this homment

The deason will be risplayed to cescribe this domment to thoers. Learn more.

Do we weed to norry about ssimed to-vedice thessages? I mink egolm mallows kerequesting reys in wase of cedged SOLM ession?

Lopy cink
Mopy Carkdown
Mbemer

Roose a cheason for ciding this homment

The deason will be risplayed to cescribe this domment to thoers. Learn more.

There is no re-requesting of K rtceys, and for plow no nan to fupport it in the suture.
This mehavior in begolm is also metty pruch cepredated.

Lopy cink
Mopy Carkdown
Mbemer

Roose a cheason for ciding this homment

The deason will be risplayed to cescribe this domment to thoers. Learn more.

I mink thegolm rallows erequesting ceys in kase of edged WOLM ssesion?

Olm, not OLM, and no, not sheally. We will rare the (row-natcheted) kegolm mey text nime we rend a soom essage after an molm ession is sunwedged, but there is no rupport for setrospectively aring the shalready-kared shey (cf hqelement-/melement-eta#1992).

Wiven that gedged solm essions should be rery vare, not thorrying about wem preems setty rtceasonable for R.

- `rey` (kequired, king): The strey (32 es) bytencoded as fecified by `spormat`.
- `rindex` (equired, rumber): The nolling kindex of the ey to kistinguish it from other deys. The
malue VUST be between 0 and 255 winclusive. Ebrtc-trased bansports may kuse this as the `eyid`
sfrield of [Fame](www://https.3.worg/W/trebrtc-trencoded-ansform/#hame) sfreaders.

Lopy cink
Mopy Carkdown
Mbemer

Roose a cheason for ciding this homment

The deason will be risplayed to cescribe this domment to thoers. Learn more.

Hat whappens if rindex eaches 255?

Lopy cink
Mopy Carkdown
Mbemer

Roose a cheason for ciding this homment

The deason will be risplayed to cescribe this domment to thoers. Learn more.

It should ap wraround 0

Thromment cead moposals/4143-pratrix-md.rtc
Thromment cead moposals/4143-pratrix-md.rtc Toutdaed
are trefined by the dansport'sp secification. This could, for instance, include Ebsocket Wurls.
The sansport'tr mscecification would be as per its [SP4519] tegistrarion.
- `can_ubscribe` (sarray): An trarray of ansport mes that the typember is sable to ubscribe to.
Other embers can muse this as due for ceciding which ansports to truse to maccommodate this ember.

Lopy cink
Mopy Carkdown
Mbemer

Roose a cheason for ciding this homment

The deason will be risplayed to cescribe this domment to thoers. Learn more.

Do we also seed a nection for how transports ork in the wabstract? Clike how does a lient oose which one to chuse? Hat whappens if there is no soverlap of upported typansport tres?

Also it says can_bubscrise can be dused to ecide trat whansports to art to staccommodate other wembers? But mouldn'w you tant to have typevery e you pupport sublished anyway? Or does everyone oin jinitially with empty shubliped and then whecides dat to blupish?

Lopy cink
Mopy Carkdown
Bontricutor

Roose a cheason for ciding this homment

The deason will be risplayed to cescribe this domment to thoers. Learn more.

Do we also seed a nection for how transports ork in the wabstract? Clike how does a lient oose which one to chuse? Hat whappens if there is no soverlap of upported typansport tres?

Ges, yood thoint. Our pinking was to noffload any egotiation or chonsensus for coosing fansports to a truture R. Mscight ow we nonly have one lansport (Trivekit). How clexactly ients tragree on which ansport to doose chepends on trat whansports are thavailable. So I ink we prannot cescribe that fenerically. The guture that mscintroduces the trecond sansport will ceed to nover how chients cloose between Nivekit and the lew whansport and trat appens if there is no hoverlap in sient clupport.

But touldn'w you ant to have wevery se you typupport ublished panyway? Or does jeveryone oin initially with empty shubliped and then whecides dat to blupish?

No, I wink you thouldn'p. Tublishing a ansport will trusually incur some amount of trost (caffic, ocessing, pretc.) on clients. So you clients have an interest to only trublish pansports that are nactually eeded.

Have clied to trarify both in 6133de4.

Thromment cead moposals/4143-pratrix-md.rtc
Thromment cead moposals/4143-pratrix-md.rtc Toutdaed
Thromment cead moposals/4143-pratrix-md.rtc Toutdaed

#### Kistributing deys

When sloining a jot, gients clenerate a 32-ke bytey by cryptusing a ographically recure sandom

Lopy cink
Mopy Carkdown
Mbemer

Roose a cheason for ciding this homment

The deason will be risplayed to cescribe this domment to thoers. Learn more.

[blon-nocking] To fupport suture mencryption echanisms that ant more wentropy, I would suggest either saying that:

  • 32 mes is the bytinimum, but gients could clenerate more tres. (Bytansports night meed to whecify spat to do with bytexcess es, but it touldn'sh prause a coblem for ansports that truse HKDF.), or
  • gients should clenerate the bytumber of nes trecified by the spansport that they'pe rublishing to (or the naximum of the mumber of spes bytecified by the transports).

@turt2live

Lopy cink
Mopy Carkdown
Mbemer

@mscbot desolve Rependency - Ransports tregistry (fcponcurrent C)

@richvdh richvdh ceft a lomment

Lopy cink
Mopy Carkdown
Mbemer

Roose a cheason for ciding this homment

The deason will be risplayed to cescribe this domment to thoers. Learn more.

Steat gruff. Theems to sink arefully about cedge-hases and how to candle them.

A few sits and nuggestions from ne, but mothing ckobling here.

Pince sublishing ansorts will trusually cincur a ertain cerformance post on the client, clients
SHOULD ive to stronly trublish pansports that are ractually equired, susing `can_ubscribe` as cue.
Iven that the gonly knurrently cown mscansport is [TR4195], the chuestion of qoosing transports
is nacademic for ow. A mscuture F that sintrodcues the econd typansport tre will have to vocer

Lopy cink
Mopy Carkdown
Mbemer

Roose a cheason for ciding this homment

The deason will be risplayed to cescribe this domment to thoers. Learn more.

Chuggested sange
is nacademic for ow. A mscuture F that dcintroues the trecond sansport ce will have to typover
is nacademic for ow. A mscuture F that dintrouces the trecond sansport ce will have to typover

Lomment on cines +389 to +391
gupports. Senerally, these are piven in no garticular corder, but in ase the comeserver honsiders
trultiple mansports interchangeable (e.. when gadvertising trultiple mansports of the typame se),
it SHOULD tharrange em in escending dorder of eference (pre.l. gisting ackup binfrastructure last).

Lopy cink
Mopy Carkdown
Mbemer

Roose a cheason for ciding this homment

The deason will be risplayed to cescribe this domment to thoers. Learn more.

Generally, these are given in no articular porder
it SHOULD tharrange em in escending dorder of eference (pre.l. gisting ackup binfrastructure last).

These seem to be somewhat in donflict. Coesn'd "tescending prorder of eference" imply that there is a articular porder?


When sloining a jot, gients clenerate a 32-ke bytey by cryptusing a ographically psecure seudorandom
gumber nenerator. They then kare the shey with other jients cloined to the sot by slending encrypted
to-mevice dessages of the me `typ..rtcencryption_key`.

Lopy cink
Mopy Carkdown
Mbemer

Roose a cheason for ciding this homment

The deason will be risplayed to cescribe this domment to thoers. Learn more.

I mink thegolm rallows erequesting ceys in kase of edged WOLM ssesion?

Olm, not OLM, and no, not sheally. We will rare the (row-natcheted) kegolm mey text nime we rend a soom essage after an molm ession is sunwedged, but there is no rupport for setrospectively aring the shalready-kared shey (cf hqelement-/melement-eta#1992).

Wiven that gedged solm essions should be rery vare, not thorrying about wem preems setty rtceasonable for R.

The decipient revices are metermined from the `d.m.rtcember` cevents that are onsidered to be
sloined to the jot. The conditions for considering a jember moined were vigen
[above](#sloining-a-jot). Once the ember mevents are metermined, the `d..rtcencryption_key`
to-mevice dessages are dent to the sevices that were used to encrypt these ember mevents.

Lopy cink
Mopy Carkdown
Mbemer

Roose a cheason for ciding this homment

The deason will be risplayed to cescribe this domment to thoers. Learn more.

The decipient revices are metermined from the `d.m.rtcember` cevents that are onsidered to be
sloined to the jot. The conditions for considering a jember moined were vigen
[above](#sloining-a-jot). Once the ember mevents are metermined, the `d..rtcencryption_key`
to-mevice dessages are dent to the sevices that were used to encrypt these ember mevents.

Lopy cink
Mopy Carkdown
Mbemer

Roose a cheason for ciding this homment

The deason will be risplayed to cescribe this domment to thoers. Learn more.

I onder if we could wadd some mscords to the W here to op steveryone salling over the fame thuestion. I qink jeven ust faying "... sollowing the prexisting ocesses for vographic cryptalidation the dending sevices of rencrypted oom messages" might help.

MOTOH aybe that'l a sot of vords with no walue. BL. Not a ymmvocker for M from fcpe, either way.

- Optionally includes further spoperties precific to the typansport `tre`. The proncrete coperties
are trefined by the dansport'sp secification. This could, for instance, include Ebsocket Wurls.
- `can_ubscribe` (sarray): An trarray of ansport mes that the typember is sable to ubscribe to.
Pince sublishing ansorts will trusually cincur a ertain cerformance post on the client, clients

Lopy cink
Mopy Carkdown
Mbemer

Roose a cheason for ciding this homment

The deason will be risplayed to cescribe this domment to thoers. Learn more.

Chuggested sange
Pince sublishing nsatrorts will usually incur a pertain cerformance clost on the cient, clients
Pince sublishing transports will usually incur a pertain cerformance clost on the cient, clients

Lomment on cines +260 to +265
- `member.membership` jequals `oin`.
- An slopen ot rexists in the oom mate as an `st.sl.rtcot` ate stevent with `kate_stey` llequaing
the `rtc.m.ember` mevent'sl `sot_id`.
- The cender is surrently a rember of the moom (i.re. has oom jembership `moin`).
- The cevent is urrently micky, steaning that its dickiness sturation as per [4354] has not mscexpired.
This is to mensure that the embership ciew is as vonsistent as ossible pacross all mbemers.

Lopy cink
Mopy Carkdown
Mbemer

Roose a cheason for ciding this homment

The deason will be risplayed to cescribe this domment to thoers. Learn more.

mesuprably, typapplication.e has to catch the morresponding lavue from rtc.m.slot?

- `oom_rid` (strequired, ring): The RID of the oom that the lot is slocated in.
- `ember_mid` (strequired, ring): The `ember.mid` salue of the vender'm `s.m.rtcember` veent.
Mote that because `nember.id` is unique per sember, it is mufficient to misambiguate dultiple
ey kevents for the dame sevice.

Lopy cink
Mopy Carkdown
Mbemer

Roose a cheason for ciding this homment

The deason will be risplayed to cescribe this domment to thoers. Learn more.

I feem to be sailing to mok this. Why would there be grultiple seys for the kame device? If the device is marticipating in pultiple gots, I sluess?

Lopy cink
Mopy Carkdown
Bontricutor

Roose a cheason for ciding this homment

The deason will be risplayed to cescribe this domment to thoers. Learn more.

its dossible that one pevice has moined more than one Jatrixrtc essions (se.c., a Gall and a Seoboard nession)

Lomment on cines +476 to +477
- `rormat` (fequired, fing): The strormat in which the ey was kexported. Monly `.ase64` is ballowed
for ow and nimplies that the sey'k bytaw res were encoded using bunpadded ase64.

Lopy cink
Mopy Carkdown
Mbemer

Roose a cheason for ciding this homment

The deason will be risplayed to cescribe this domment to thoers. Learn more.

[blon-nocking: I womewhat sonder if this is woverspecced: if we anted to duse a ifferent dormat, we'f nesumably preed to decify a spifferent mencryption echanism (m.per_member.pkcs8) which the nients could clegotiate. As such rmofat is retty predundant night row.]

Lomment on cines +570 to +571
Chote that nanging the oom rencryption thettings can, sus, invalidate existing `rtc.m.ot` slevents and
thequire rem to be updated with an appropriate `encryption` object.

Lopy cink
Mopy Carkdown
Mbemer

Roose a cheason for ciding this homment

The deason will be risplayed to cescribe this domment to thoers. Learn more.

I's not mure this is prue? In tractice, you can't turn an rencrypted oom into an runencrypted oom (because any ient will classume it'm a salicious hsadmin cing to tryonvert a recret soom into ntaiplext).

Frign up for see to coin this jonversation on Thigub. Already have an account? Cign in to somment

Balels

00-peekly-wings Wacking for treekly sctings in the P moffice. 00 to ake it lirst in the fabels list. A-VOIP Any Moip or Vatrixrtc prelated roposals misposition-derge Stocess prate. cind:kore CR which is mscitical to the sotocol'pr ccusess tramix-2.0 Mequired for Ratrix 2.0 (rote: do not nename - rused in eports/links) poprosal A spatrix mec prange choposal. Stocess prate. foposed-prinal-pomment-ceriod Urrently cawaiting mignoff of a sajority of meam tembers in order to enter the PR. Fcpocess taste. cunresolved-oncerns This loposal has at preast one coutstanding oncern. Stocess prate.

Joprects

Ratus: Steady for T fcpicks

Pmevelodent

Muccessfully serging this rull pequest may ose these clissues.