-
southerntofu
hello, we had a chat about account migration on another chan
-
southerntofu
i was proposing we should standardize client signatures for migration requests early on, whether clients wish to verify them or not
-
southerntofu
could use OMEMO or PGP keys you already trust as associated to an account, in my view
-
jonas’
I think this goes well as an add-on XEP, especially since the different crypto-methods will have different ways to do that.
-
Ge0rG
Sounds like one XEP that defines the wire format to be signed, ECAPS style, and a different XEP per encryption protocol for the signature.
-
jonas’
Ge0rG, I was reminded more of jet
-
MattJ
I think a choice of encryption protocols may be counterproductive
-
jonas’
I think agility on that is required though
-
MattJ
Sure
-
jonas’
even if only to migrate from OMEMO -> whatever-follows-OMEMO
-
jonas’
(without rewriting all the protocols)
-
MattJ
But I'd prefer that someone chooses one way, specs that, and we can update it in the future if needed
-
jonas’
and the issue of OMEMO having no key to authenticate the account (as opposed to the device) remains.
-
jonas’
so OX would be the more natural choice for that
-
jonas’
but "nobody" uses that
-
Ge0rG
Who needs account keys anyway?!
-
jonas’
Ge0rG, wasn’t SEX based on account keys?
-
southerntofu
Ge0rG, i was precisely proposing the mechanism to expose the signature be standardized as part of the XEP, then we can have extensions to describe how to achieve such signatures with this or that kind of keys
-
southerntofu
jonas’, SEX?
-
MattJ
I see no advantage to that approach
-
southerntofu
MattJ, letting client devs know there are or is going to be signatures to valide the migration requests so they're less easily forged?
-
Ge0rG
southerntofu: not the signature but the hash of the data to be signed?
-
Ge0rG
jonas’: SEX was as sarcastic as my remark about account keys
-
MattJ
southerntofu, and this is actionable for devs how? The spec already says further verification methods may exist in the future. Right now we can only guess how they may work.
-
MattJ
Also I should say that my thoughts for crypto are not to protect from malicious servers, but to work around the scenario where the original server is no longer available
-
MattJ
I see that as a common enough scenario that we should try to solve it if we can
-
jonas’
#blabber.im
-
MattJ
Indeed, and the many before it
-
MattJ
duckduckgo, fastmail, ...
-
MattJ
Both had XMPP services with thousands of users that they just decided to shut down
-
MattJ
Neither actively wanted to prevent people migrating away
-
southerntofu
<new-jid>foo@bar</new-jid><signatures><SIG_TYPE>... defined in new extensions ...</SIG_TYPE></signatures>
-
southerntofu
maybe something like this?
-
southerntofu
where we agree `<new-jid>foo@bar</new-jid>` is what should be signed by the clients, but then the specific format can be further spceified
-
MattJ
<omemo-sig xmlns="urn:xmpp:moved-omemo-sig:1">...defined in new extensions...</omemo-sig>
-
Ge0rG
MattJ: shouldn't the OMEMO key be the primary identity of the user then, and the JID becomes a mere ephemeral routing token?
-
southerntofu
sure but maybe not just OMEMO though.. (i think PGP is very well suited for such cases)
-
MattJ
Ge0rG, yes, sounds like a great plan.....
-
southerntofu
Ge0rG, yes precisely
-
MattJ
<ox-sig xmlns="urn:xmpp:moved-ox-sig:1">...defined in new extension...</ox-sig>
-
southerntofu
i mean if you loose your keys you can still reestablish trust through other channels, but once you have keys exchanged it makes sense that keys are your identity
-
Ge0rG
So now we have invented a cryptographic identity based overlay network on top of xmpp.
-
southerntofu
looks good
-
southerntofu
MattJ, do you think standardizing these OMEMO/OX extensions would be troublesome?
-
Ge0rG
Now we can replace the server side roster with a client side list of trusted keys and their respective meta data and ephemeral JIDs, and we have a new secure chat system that has nothing to do with Jabber
-
MattJ
southerntofu, not if you can figure out what to sign, how, with what key, and how recipients can verify it
-
MattJ
Just do it
-
MattJ
But there are no changes required to the current spec in this regard, it already allows for such extension, that's all I'm saying
-
southerntofu
ok i'll reread OMEMO spec :)
-
MattJ
I don't consider myself a crypto person, but I see no way to reliably do this with OMEMO
-
rom1dep
There's already https://xmpp.org/extensions/xep-0415.html if we want P2P 🙂
-
southerntofu
> Libraries can use an Ed25519 key pair as their internal IdentityKey. In this case, the IdentityKey can create EdDSA-compatible signatures directly, and has to be converted first to perform X25519.
-
southerntofu
from OMEMO spec... sounds like OMEMO signatures are already well specified :)
-
jonas’
southerntofu, I think the best way forward would be to write something down in XEP form
-
jonas’
<editor-hat>I am happy to assist with any issues around the process</editor-hat>
-
southerntofu
thanks jonas’ i think i'll first try to craft a signature using my own OMEMO keys and verify it, just to see how it works
-
emus
MattJ: If there is a way I can help with this let ne know https://xmpp.org/extensions/inbox/moved2.html
-
MattJ
Thanks
-
southerntofu
MattJ, here's a PoC for signatures using OMEMO keys, using gajim keys https://tildegit.org/southerntofu/omemo-signatures
-
MattJ
So how would it work? One of your devices signs the moved statement, and the recipients just check for any of their stored fingerprints for that user matching the signing key?
-
southerntofu
yes, the embedded signature(s) would also contain the corresponding public key, so if you have 10 keys for someone you don't have to try them all to find the correct one.. but that's the idea
-
MattJ
Right
-
MattJ
I guess this can also be implemented server-side... technically :)
-
southerntofu
sure thing
-
southerntofu
personally i find it more appropriate client-side so we can have a confirmation process before migrating, letting users know about it
-
southerntofu
but that's just a personal opinion :)
-
southerntofu
https://ttm.sh/FOS.txt <-- could look like this
-
southerntofu
also multiple signatures can be chained from different device keys
-
southerntofu
(the signature/key is bogus in this example i linked)
-
southerntofu
how would account migration handle existing message archives and published content on PubSub?
-
MattJ
They are in the XEP-0227 file
-
MattJ
Or they will be, when my update is approved and merged
-
southerntofu
yes i can see that, but the JIDs have changed, so if i query your microblog on your new address, even if data has been moved, the server will return nothing because the data is archived for your old JID... am i correct?
-
pep.
no because PEP is on the account, so it'll be imported to the new account
-
pep.
There should be no mention of a JID there I guess
-
pep.
pubsub though is different
-
pep.
Dunno how that's handled
-
pep.
If that's handled.
-
southerntofu
https://xmpp.org/extensions/xep-0277.html#example-2 <-- correct
-
southerntofu
at least when publishing there's no JID involved
-
pep.
yeah that's microblog, generally used on PEP (except Movim and Libervia use it on PubSub as well..)
-
pep.
And hmm, wait you're not quoting the appropriate block
-
pep.
https://github.com/xsf/xeps/pull/1064/files#diff-f94da706aed4fca9036ff0b2875918fe0a7021efbc004e76825e10c74463df0aR344
-
pep.
right well 227 doesn't mention pubsub at all does it
-
pep.
"out of scope"
-
Zash
PEP is part of MattJ pending update
-
pep.
Yeah
-
southerntofu
so consider me not nowledgeable about such things but very curious about changing JIDs and how that can break user expectations
-
pep.
But not generic PubSub data right. Though I guess that could easily be reused..
-
southerntofu
i expect migration to be "transparent" to me as an end-user so that i retain history and such.. maybe that was obvious idk :)
-
Zash
I sense some confusion.
-
pep.
I sense that some more "non-goals" should be added to Moved2 :P
-
Zash
If the data has been moved (= imported and exported) then it *would* be available at the new JID. Or why do you think not?
-
pep.
But that can be a problem for modernxmpp
-
pep.
Zash, that might be true of the person moving
-
Zash
Mechanisms for export and import are undefined as of yet, AFAIK, unless MattJ sneaked it into an update I haven't seen yet.
-
pep.
That won't be true of the contacts
-
Zash
Which leads to the Moved stuff magically creating that association.
-
Zash
And PEP stuff being presence based will magically start working again once you Moved all the roster relations.
-
Zash
Explicit subscriptions can be passed through the export file✎ -
Zash
Explicit (PEP) subscriptions can be passed through the export file ✏
-
pep.
Tbh, it feels like we don't have the same expectations. As much as I would like it to be, it doesn't seem to me XMPP is identity based atm, that is you'd have one identity that can stay the same whether you're foo@bar or baz@qxx.
-
pep.
(talking to southerntofu)
-
pep.
Things might go in this direction sometimes but I feel it's just a coincidence
-
MattJ
I am absolutely not working on cryptographic identity for XMPP
-
MattJ
Maybe someone can build that out of these blocks, possibly combined with others
-
MattJ
To me that is a complex problem, while we have 5000 real users about to lose their XMPP accounts in less than a week
-
pep.
You honestly think you'd be able to migrate them in less than a week? :/
-
MattJ
Well I had planned to work on jabber.org this week, but I hit a roadblock
-
MattJ
So while I'm waiting I may as well try
-
southerntofu
Zash, i was/am concerned that some of that migrated data refers to specific JIDs and so i'm wondering if it would be possible or desirable to do something about that server-side so the move is transparent to the client
-
southerntofu
(which is not a question about cryptographic identity :))
-
southerntofu
but apparently at least for microblogging that's not a problem
-
southerntofu
MattJ, any way we / others can help with anything?
-
MattJ
My current plan is to write a .ceb (Conversations/Blabber backup file format) -> XEP-0227 converter
-
Zash
Wait what
-
Zash
MattJ, did you see that Gajim (I think) import export work?
-
MattJ
No
-
Zash
I think it was NIH'd XEP-0227 extensions
-
Zash
→ https://logs.xmpp.org/xsf/2020-12-27?p=h
-
Zash
Cross-MUC links whenq✎ -
Zash
Cross-MUC links when? ✏
-
qy
as in sharing quotes between mucs?
-
qy
or linking to a specific message in a muc?
-
Zash
Referencing specific messages in other MUC
-
Zash
Quotes optional
-
southerntofu
Zash, interesting conversation, shows there is interest for the question
-
Zash
Tho upon re-reading, this was exports from the client, not from the account/server.
-
Zash
Quite some overlap however, that would benefit from a shared format like XEP-0227
-
qy
hm. entirely clientside implementation possible
-
qy
wait, xmpp has message ids right?
-
qy
if so, yes
-
qy
if not, no
-
Zash
What is?
-
qy
referencing specific messages
-
southerntofu
Matt, sounds like a plan, good luck with that.. i just took a look at BackupExportService in conversations and it looks hairy... doing a manual SQL export oO
-
Zash
It's possible
-
Zash
There's even XEPs for it IIRC
-
qy
oh
-
Zash
Just, as always, client implementations 🙂
-
qy
yet again, xmpp is held back by it's clients
-
southerntofu
Zash, yes it was about client interop, which is really good.. like you said if you don't have something like XEP-0227 then both c2c and s2s migrations are "impossible"
-
pep.
227 doesn't do anything about MUC affiliations etc. right?
-
Zash
xmpp:xsf@muc.xmpp.org?stanza-id=2020-12-27-f1637f8fabdf49c3 or something something
-
pep.
Not like it can
-
southerntofu
it's the same UX expectation, that one should be able to just swap client/server and everything should be more or less transparent
-
Zash
pep., nah, just bookmarks
-
pep.
So there's a bunch of channels you wouldn't be able to rejoin
-
Zash
category of things that would be easier if we had implemented MIX already
-
southerntofu
pep., probably MUC servers should also interpret the Moved request
-
pep.
It's not designed for them currently, but yeah maybe
-
Zash
Probably doable with some dance similar to what you'd do for presence subscriptions?
-
pep.
hmm, yeah maybe you can try to join the first time with a moved tag in it
-
pep.
MUC checks PEP and comes back to you
-
pep.
Might take some time though..
-
Zash
Magic registration-esque request?
-
MattJ
Yeah, I think it needs something like that
-
MattJ
But first things first...
-
southerntofu
pep., that makes sense to join with a Moved, but what if your old server has closed already by the time MUC server implements Moved?
-
pep.
That's not in the requirements for Moved2 :x
-
Zash
"First things fist, but not necessarily in that order"
-
pep.
So yeah..
-
southerntofu
pep., i'm not interesting in the requirements already defined or whether something should fit in this specific XEP or not, i'm interesting in the actual consequences in terms of UX and what we can do about it :P
-
pep.
It's not possible in this case, without cryptostuff
-
pep.
As you could have guessed
-
pep.
Then you need to teach MUCs OMEMO ><
-
pep.
You're gonna get some backlash I say :P
-
southerntofu
idk.. is there some kind of stanza for s2s announcements that can be archived server-side, so that when the server implements Moved it can retrospectively interpret Moved requests?
-
pep.
MUCs don't have to be link to any of your contacts' server
-
southerntofu
instead of making migration a synchronous process
-
pep.
Look at joinjabber.org
-
southerntofu
yes, but you didn't answer my question: is there a way with current default settings to have the MUC server save a Moved request for later processing? or would such requests be discarded because the server doesn't understand them?
-
southerntofu
like is there a special s2s namespace specifically for that kind of server requests that other servers may not understand yet but may wish to treat later?
-
pep.
Currently it would just discard anything it doesn't understand
-
pep.
That's what you do in XMPP
-
pep.
I don't think there is such a thing?
-
MattJ
Otherwise it has to store stuff it doesn't know from strangers for... how long?
-
MattJ
Sounds open to abuse
-
southerntofu
idk could be a per-server quota of like 1MB or something, or only accept such announcements from servers you already have trustworthy s2s relationships with, or..
-
southerntofu
but ok that's not an option unfortunately
-
pep.
MUC PEP? But it's not like you can publish on it yourself