XSF Discussion - 2018-01-26


  1. Ge0rG

    Fortunately, MUC is easy to implement. https://wiki.xmpp.org/web/XEP-Remarks/XEP-0045:_Multi-User_Chat#Matching_Your_Reflected_Message

  2. goffi

    Do we have any XEP/way to do item ordering beside using a specific element (e.g. <order>123</order>) and a MAM query?

  3. goffi

    I don't think so, but just in case I've missed something

  4. SaltyBones

    So, why is it that a group chat with jabber doesn't give me the messages that I missed when I come back online?

  5. SaltyBones

    It seems there are some related mechanisms in place.

  6. MattJ

    There are two mechanisms for that

  7. SaltyBones

    And of course for some sorts of chat rooms in doesn't really make sense...

  8. moparisthebest

    SaltyBones: it does if mam is enabled on the muc

  9. jonasw

    moparisthebest, and the client supports it.

  10. SaltyBones

    *and you don't want crypto*

  11. jonasw

    that’s false

  12. moparisthebest

    SaltyBones: nope works fine with crypto

  13. jonasw

    OMEMO should work fine with archives

  14. SaltyBones

    That's what I heard. :)

  15. jonasw

    OTR won’t

  16. moparisthebest

    Also pgp

  17. jonasw

    gpg too, yes

  18. moparisthebest

    Otr doesn't work in mucs at all

  19. SaltyBones

    jonasw, but then the archive will contain the decrypted messages or something, right?

  20. moparisthebest

    No

  21. jonasw

    SaltyBones, no

  22. SaltyBones

    Hm.

  23. SaltyBones

    So what you're saying is: Everything should totally work. :)

  24. jonasw

    iff both client and server support MAM

  25. moparisthebest

    and it's enabled on the muc

  26. SaltyBones

    I am currently trying to figure that out.

  27. SaltyBones

    But neither gajim nor conversations seem to be very helpful. :)

  28. zinid

    And what about forward secrecy?

  29. SaltyBones

    zinid, probably broken, cannot imagine any other way

  30. moparisthebest

    no, that depends on encryption method

  31. moparisthebest

    none with pgp, works as expected with omemo

  32. SaltyBones

    are there any clients that can display if a muc has mam or is that serverside info only?

  33. moparisthebest

    that is, each device can decrypt each message exactly once

  34. moparisthebest

    clients know, not sure if any display

  35. zinid

    How will you decode a message from archive encrypted with forward secrecy?

  36. moparisthebest

    (they have to know to know whether they can mam query or not)

  37. SaltyBones

    wait is mam not the same as server side history?

  38. moparisthebest

    as MattJ said there are 2 methods so depending what you mean probably not

  39. moparisthebest

    you want mam though, the other isn't guaranteed to be complete

  40. SaltyBones

    there are two MAMs?

  41. Ge0rG

    who wants forward secrecy anyway?

  42. Ge0rG

    it's even worse than cryptographic deniability.

  43. moparisthebest

    dissidents so I hear

  44. SaltyBones

    Ge0rG, almost nobody but a lot of people want it on principle, including me. :)

  45. moparisthebest

    forward secrecy is actually useful unlike deniability imho

  46. Ge0rG

    SaltyBones: a lot of people have no clue.

  47. MattJ

    SaltyBones, method #1 is a simple cache of recent messages in the room. The MUC tends to send it to you by default, though clients can (and do) filter it

  48. Ge0rG

    https://dymaxion.org/essays/pleasestop.html - "Please Stop Writing Secure Messaging Tools"

  49. moparisthebest

    point being it works fine with muc + mam

  50. moparisthebest

    Ge0rG, clearly written by NSA plant

  51. MattJ

    SaltyBones, it's almost universal, but doesn't actually need client support - the recent messages are always just sent to you (most servers default to 20 or so)

  52. SaltyBones

    Ge0rG, I would agree if I thought that one of them was good enough.

  53. moparisthebest

    s/NSA/GOV_OF_YOUR_CHOICE_HERE/

  54. MattJ

    SaltyBones, which is enough to get some context on an ongoing conversation

  55. SaltyBones

    MattJ, yeah, that mechanism is pretty obvious in gajim...

  56. Ge0rG

    OMEMO is bad because you can't bind a cryptographic identity to a JID in any strong way.

  57. MattJ

    SaltyBones, there's a second method (MAM), which requires explicit client and server (i.e. MUC server) support, and supports fine-grained sync, ensuring that you can achieve a full sync of all messages that happened while you were out of the room

  58. jonasw

    MattJ, unless the server keeps CSN and other useless things in the history ;-)

  59. MattJ

    One client's useless is another client's treasure

  60. SaltyBones

    Ge0rG, I think that article is mostly crap but I would be interested in discussing. ;)

  61. moparisthebest

    > Ge0rG: OMEMO is bad because you can't bind a cryptographic identity to a JID in any strong way.

  62. moparisthebest

    uh and what ways do allow you to do that?

  63. moparisthebest

    I think, none actually

  64. Ge0rG

    moparisthebest: things like TOX, where your ID is your public key

  65. moparisthebest

    that's fine if you are talking about an entirely different protocol

  66. Zash

    Something something triangle

  67. moparisthebest

    that eats battery and is unsuitable for mobile

  68. SaltyBones

    IBE requires a trusted third party which I find generally undesirable

  69. Ge0rG

    Zash: something something blockchain

  70. SaltyBones

    BLOCKCHAIN!

  71. SaltyBones

    The funny thing is, blockchain derivates are actually usefull for PKI

  72. moparisthebest

    I can feel my synergies aligning already, lets get an IPO and some angel funding asap

  73. SaltyBones

    Hm...I am totally in the mood for discussing everything but I have to get some more work done. :/

  74. zinid

    moparisthebest: I think it's possible to avoid battery consumption with help from very simple relays

  75. moparisthebest

    I call those xmpp servers :P

  76. moparisthebest

    though, not simple

  77. zinid

    moparisthebest: "simple"

  78. Ge0rG

    https://www.wired.com/story/mobilecoin-cryptocurrency/

  79. moparisthebest

    let me fix that title s/The Creator of Signal Has a Plan to Fix Cryptocurrency/The Creator of Signal Has a Plan to Finish Construction of His Money Fort/

  80. SaltyBones

    cryptocurrencies are bullshit :p

  81. zinid

    moparisthebest: but I'm told he is a hero, you're just jealous

  82. Ge0rG

    moparisthebest, SaltyBones: seriously though: OMEMO is attempting to work around the problem that JIDs are not cryptographic entities, and there will never be a perfect alignment of them.

  83. Ge0rG

    if you want E2EE without meta data leaks, XMPP is not the right tool. Have a look at something like https://briarproject.org/ instead.

  84. Ge0rG

    If you want XMPP, just give up hiding your metadata and accept reality.

  85. Ge0rG

    And once you've realized that, the added benefit of E2EE is minuscule.

  86. SaltyBones

    The benefit of e2e is miniscule when there is metadata leakage?

  87. SaltyBones

    I completely disagree. :)

  88. jonasw

    I’d argue that the benefit of e2ee should be miniscule since ideally we had friends&family servers exclusively

  89. MattJ

    Agreed

  90. MattJ

    I don't think it's completely pointless in any scenario, but trusted servers buys you a whole lot more

  91. SaltyBones

    That's an interesting point...

  92. SouL

    This will not be the case, at least in a not-soon future D:

  93. MattJ

    On the other hand some people really value anonymity, which goes in completely the other direction - we should just have an internet full of servers, random JIDs and use E2EE for identity proof and encryption

  94. SaltyBones

    Given that most murders are committed by spouses or whatever maybe friends and family servers should be less trusted. :)

  95. Ge0rG

    SaltyBones: so if I know my wife's password and lock screen pattern, she's still safe, right?

  96. Ge0rG

    also related: https://dymaxion.org/essays/usecases.html

  97. SaltyBones

    It's not a good idea to argue against securing one part of a system because another part of the system might be insecure. If your wife has an affair maybe she will change her lock screen pattern...

  98. Ge0rG

    SaltyBones: in that case I can beat her up. (playing the devil's advocate here, obviously)

  99. Ge0rG

    SaltyBones: also I can still see which JIDs are on her roster.

  100. Ge0rG

    "So, who is sexy_patrick69@swissjabber.li?"

  101. SaltyBones

    Come on, these are all incredibly weak arguments that you can immediately invalidate by yourself.

  102. SaltyBones

    This is not a useful discussion. :)

  103. SaltyBones

    How do you know you have to beat her up? Just because she changed her lock screen?

  104. Ge0rG

    SaltyBones: sure

  105. SaltyBones

    Maybe the guy she s seeing is a colleague from work and it s perfectly normal for them to talk

  106. Ge0rG

    SaltyBones: how much do you know about abusive partners?

  107. SaltyBones

    Abusive partners are not the only adversaries and abusive partners probably also come in all sorts of degrees

  108. Ge0rG

    SaltyBones: so you don't even know the attacker model you want protection from?

  109. SaltyBones

    I trust my co-admin not to read my messages I still prefer that he simply cannot when I use omemo

  110. SouL

    SaltyBones, yeah, I agree.

  111. SouL

    Even if I don't use OMEMO myself

  112. SaltyBones

    I have a sufficiently good idea of my attacker model but it's not formally defined ;)

  113. Ge0rG

    SaltyBones: I don't say that E2EE is generally bad. I merely say that it has a cost attached, and that cost is inability to restore archives, various synchronisation problems (why can't I receive messages) and multi-client woes.

  114. Ge0rG

    SaltyBones: so for the general audience, OMEMO does more harm than good.

  115. SaltyBones

    and I also like that even if my server gets owned I can still send account data and scans of legal documents to people without worrying where they might end up

  116. Ge0rG

    And I even haven't started to talk about the two incompatible flavors of OMEMO.

  117. SaltyBones

    Ge0rG, oh I completely agree that omemo isn't great but omemo is an implementation of e2e not the definition.

  118. SaltyBones

    Actually, gpg probably has much better usability whilst also protecting against the attacker model we just discussed

  119. Ge0rG

    SaltyBones: don't even get me started about the usability of GPG

  120. SaltyBones

    :D

  121. SamWhited

    "gpg probably has much better usability" is not something anyone has ever said with a straight face before :)

  122. SaltyBones

    only people who haven't tried ;D

  123. Ge0rG

    SaltyBones: so you haven't tried? Noted.

  124. Ge0rG

    "But I want OMEMO in the browser, and I want to access my archive!"

  125. SaltyBones

    No, GPG is death by key management...

  126. Ge0rG

    SaltyBones: OMEMO is also death by key management..

  127. Ge0rG

    or death by `adb backup`, which is even worse.

  128. SaltyBones

    Ge0rG, signal however, is not

  129. SaltyBones

    and actually omemo works okay

  130. SaltyBones

    you have to consider that even if you don't ever validate anything it still protects agains passive adversaries

  131. Ge0rG

    SaltyBones: against passive adversaries who have admin access to your server and want to know more than just your metadata.

  132. Ge0rG

    and then it's just a command or two to add another key to your identity.

  133. SaltyBones

    Yes, and a warning will pop-up that you can chose to not ignore and also they cannot read the history...

  134. Ge0rG

    My problem really is that with OMEMO, you have 3+x identities: your JID, your username, and a number of device keys.

  135. SaltyBones

    And that's total shit, I agree.

  136. Ge0rG

    My problem really is that with OMEMO, you have 3+x identities: your JID, your display name, and a number of device keys.

  137. Ge0rG

    and those aren't linked in any cryptographically significant way.

  138. SaltyBones

    Actually, I don't care much about JID and username...but there should only be one key

  139. SaltyBones

    Hm..what kind of linking are you thinking about?

  140. MattJ

    One key => key management becomes a real pain

  141. MattJ

    In the real world, people lose their phones

  142. Zash

    One key per what?

  143. Ge0rG

    MattJ: yeah, but what about key cross-signing. If I buy a new device before the previous one is broken, I sign my new key with the old one and my friends auto-trust it

  144. SaltyBones

    yeah, that

  145. MattJ

    if

  146. Ge0rG

    Is the JID encoded in the public key cert?

  147. Ge0rG

    or can I use the same OMEMO key on different JIDs?

  148. Zash

    What we need is more X.509!

  149. Ge0rG

    what's my identity? The JID or the pubkey?

  150. SaltyBones

    Zash, wait here I'll get my pitch fork.

  151. MattJ

    On the one hand you're talking about making XMPP easier to use. On the other hand you're talking about asking family members to perform key cross-signing

  152. Zash

    What is identity?

  153. MattJ

    Your identity is the JID, simple

  154. MattJ

    So just keep it that way

  155. SaltyBones

    gngngngn

  156. SaltyBones

    what

  157. SaltyBones

    stop

  158. SaltyBones

    the identity is the key!

  159. SaltyBones

    :)

  160. Ge0rG

    MattJ: "scan your old device with your new device to auto-configure your jabbers"

  161. MattJ

    Ge0rG, the old device is broken, stolen or lost

  162. Holger

    Ge0rG: I do WHAT?!

  163. Holger

    Ge0rG: Can't we just use WhatsApp please?! That just works!!!

  164. SaltyBones

    Yeah, or just get a pop-up: "You want to add a new device. Please confirm!" on the old phone

  165. Ge0rG

    SaltyBones: yeah

  166. MattJ

    90% of the phone upgrades in my family have been in response to breakage, loss or theft - not planned upgrades

  167. SaltyBones

    MattJ, that's fine then just let them also create a new key....

  168. Ge0rG

    MattJ: now we are back to the attacker model. Are we talking about trust-by-default in the general population or about secure messaging for dissidents?

  169. MattJ

    I'm talking about the general population

  170. Ge0rG

    "Where's my chat history???"

  171. MattJ

    Niche markets will help themselves, they always do

  172. Ge0rG

    E2EE just doesn't work for family chats.

  173. Zash

    Trust in the server, the server is good.

  174. Ge0rG

    that's the next thing. The server can completely strip out the OMEMO identification on your comms. What then?

  175. MattJ

    Use a different server and/or don't communicate

  176. MattJ

    This is not a novel problem

  177. MattJ

    Routers can (and in some cases do) drop TLS handshake packets

  178. Ge0rG

    Yes, but OMEMO isn't mandatory on XMPP :P

  179. jonasw

    Ge0rG, e2ee seems to work for whatsapp tohugh

  180. SaltyBones

    And signal

  181. SaltyBones

    and for my bloody family even omemo works ;)

  182. Holger

    Because no verification. And no PEP!

  183. SaltyBones

    of course I just tell them to shut up when they complain ;)

  184. Kev

    jonasw: "works" is relative, though.

  185. jonasw

    Kev, inhowfar?

  186. SaltyBones

    Holger, PEP?

  187. Kev

    In as much as the whatsapp multiaccount story is far worse than XMPP's, and I hate losing messages, and etc.

  188. Holger

    SaltyBones: Well OMEMO uses PEP for distribution of pubkeys, and that keeps falling apart.

  189. Ge0rG

    jonasw: https://www.reddit.com/r/whatsapp/comments/68sgmx/google_drive_backup_encrypted/

  190. Kev

    (Plus the recent vulnerabilities in it)

  191. jonasw

    whatsapp loses messages?

  192. jonasw

    that’s new to me

  193. Kev

    It does when you lose your phone.

  194. SaltyBones

    hehehe

  195. pep.

    https://www.reddit.com/r/whatsapp/comments/68sgmx/google_drive_backup_encrypted/dh1w7j3/ "This is where you are wrong"

  196. Zash

    -xkcd 538

  197. pep.

    heh, I had never seen the alt comment

  198. Zash

    Bunneh: Meh

  199. Zash

    Where is your wrench now?

  200. moparisthebest

    even in the case of trusted servers, I guess all servers are secure and all software well configured? that's not exactly the impression I get

  201. moparisthebest

    my xmpp server is in a closet in my house that I'm pretty confident is physically secure, and I like to consider myself competent enough security-wise that no one can hack in, but everyone makes mistakes, and no doubt some software has bugs

  202. moparisthebest

    e2e protects against that too

  203. moparisthebest

    even just the passive BTBV variants

  204. Holger

    Eww all your stanzas pass through a closet?

  205. moparisthebest

    they do :)

  206. Holger

    Oh the dictionary says "closet" != "toilet".

  207. Holger

    Ah the dictionary says there's both meanings :-)

  208. Holger

    The German "Klosett" is always a toilet.

  209. moparisthebest

    hmm never heard of that meaning, language, fun stuff

  210. moparisthebest

    I mean where you'd normally hang clothes in a bedroom :)

  211. Holger

    That's ok then :-)

  212. moparisthebest

    though, an xmpp server inside a toilet would be EXTRA physically secure

  213. moparisthebest

    I mean, you can grab it, if you want to, be my guest

  214. zinid

    moparisthebest, secure enough if you have no friends

  215. moparisthebest

    I just got around to reading your "Please Stop Writing Secure Message Tools" blog thing Ge0rG https://dymaxion.org/essays/pleasestop.html

  216. moparisthebest

    but it seems like, don't write them unless they check all these boxes

  217. moparisthebest

    and xmpp checks every single box

  218. moparisthebest

    except it could maybe deal with a little less metadata, but even then, it's scattered all over vs in one silo

  219. Zash

    something something threat model

  220. moparisthebest

    that crap where if the NSA isn't after you you don't need encryption is just that, crap, everyone needs privacy

  221. moparisthebest

    and if it's a little less user friendly than not encrypted, work on that, see letsencrypt for example

  222. zinid

    moparisthebest, do those people dumping their lives in instagram need privacy too?

  223. zinid

    privacy is a broad term

  224. moparisthebest

    sure, you choose what you want public or not

  225. pep.

    zinid, maybe they live double lives, and one of them is protecting the other by sending crap on instagram!!

  226. zinid

    who knows

  227. Holger

    moparisthebest: If someone says he doesn't like Bananas that's crap, everyone does!

  228. moparisthebest

    that would be a preference vs a statement of fact I guess

  229. Holger

    Sure sure.

  230. zinid

    "everyone needs privacy" sounds like a statement of fact ;)

  231. zinid

    the problem is in definition of privacy

  232. moparisthebest

    it's identical to the TLS vs plaintext debate honestly

  233. moparisthebest

    and that seems fairly settled nowadays that everything needs to be TLS doesn't it?

  234. Holger

    It's not identical in the case of TLS for c2s.

  235. moparisthebest

    a valid argument is/was that TLS is harder than plaintext, has useability problems etc etc

  236. Holger

    At least not when using PLAIN SASL.

  237. zinid

    moparisthebest, TLS is slow shit, I use plain http wherever possible

  238. moparisthebest

    haha but you are wrong

  239. moparisthebest

    TLS is faster in many cases nowadays

  240. Zash

    It's not "everyone needs privacy", it's > No one shall be subjected to arbitrary interference with his privacy, family, home or correspondence, nor to attacks upon his honour and reputation. Everyone has the right to the protection of the law against such interference or attacks.

  241. Zash

    It's a human right. Whatever the of privacy is.

  242. zinid

    moparisthebest, sure, you know better

  243. Zash

    It's a human right. Whatever the definition of privacy is.

  244. moparisthebest

    zinid, don't take my word for it https://www.troyhunt.com/i-wanna-go-fast-https-massive-speed-advantage/ https://istlsfastyet.com/

  245. moparisthebest

    plain http today is slower than https, there is no debate about it

  246. zinid

    that's why I use http on some sites, I'm just blind and cannot see how https is much faster

  247. Zash

    but is it fast enough to counteract the ever increasing bloat?

  248. Zash

    ... no, it just encourages more bloat

  249. Zash

    can't have fast things

  250. moparisthebest

    says a guy who enjoys shuffling XML streams around... :)

  251. Zash

    pretty sure my messages aren't in the order of megabytes

  252. SamWhited

    neither are my webpages; they're still ~20% faster if I'm using TLS.

  253. waqas

    I've been browsing with JS disabled, or selectively first-party-only enabled, and it has been a pretty great experience.

  254. zinid

    my 1-hour poezio's XML log is 300kb, horrible bloat

  255. SamWhited

    Oh, TLS won't speed anything up on XMPP, but it's not slow either. Basicaly negligable.

  256. zinid

    and here come servers where you need twice RAM to support TLS connections

  257. SamWhited

    You really don't

  258. SamWhited

    Machines are optimized for it these days; TLS's extra resource use is basically negligable unless you have a much bigger server than I think you do.

  259. moparisthebest

    even google, which has servers way bigger than any xmpp deployment, says it's essentially no overhead

  260. zinid

    ever tried to connect 1M of XMPP sessions?

  261. moparisthebest

    and that was years ago

  262. zinid

    with TLS or without

  263. moparisthebest

    TLS

  264. Zash

    You are both wrong. More than negligable, but not double memory consumption.

  265. Zash

    TLS handshakes are quite the CPU hog too.

  266. zinid

    moparisthebest, because HTTP doesn't have long-lived connections

  267. moparisthebest

    the long lived part really is 0 overhead

  268. zinid

    yeah, sure ;)

  269. moparisthebest

    any overhead is just on setup, so from that perspective, http over TLS is more overhead than xmpp over TLS

  270. moparisthebest

    and since https isn't a problem, xmpps certainly isn't

  271. zinid

    even nginx author says it's about 50k-100k overhead per connection

  272. moparisthebest

    zinid, I mean you were right in 2005 for sure, maybe even 2008 or whatever, whenever aes-ni became a thing

  273. zinid

    there is a recent issue in our bugtracker where a guy complaining about huge memory consumption when TLS is enabled

  274. zinid

    30Gb overhead

  275. zinid

    on 1M connections

  276. zinid

    but, possible, 30Gb is nothing for google

  277. moparisthebest

    is that a public bugtracker? sounds interesting

  278. zinid

    sure

  279. zinid

    it's on github issues, but I'm too lazy to find it, anyway, Holger will not let me lie, he laughed at the issue too ;)

  280. SamWhited

    What's the total memory usage?

  281. moparisthebest

    iirc when google forced https for gmail the usage increase was like 1.2% and that was pre-http2

  282. moparisthebest

    can't actually find that right now...

  283. zinid

    SamWhited, 70Gb or so, I don't remember actually

  284. moparisthebest

    https://github.com/processone/ejabberd/issues/2062

  285. moparisthebest

    is that it?

  286. zinid

    yes

  287. moparisthebest

    impressive

  288. moparisthebest

    how much memory does the rest of a connection take?

  289. moparisthebest

    what % is 50kb

  290. zinid

    it's highly depends on usage, roster size and so on

  291. zinid

    *it

  292. SamWhited

    That does seem high; 50k of overhead per connection is much more than I've ever seen; not sure what that could be.

  293. moparisthebest

    if a non-tls session takes 1mb of ram and tls adds 50kb, that's 0.09% increase?

  294. zinid

    I think he counted wrong, I'm trying to calculate now and I get numbers far above 90Gb if I do 2Mx50kb

  295. moparisthebest

    yea that's true

  296. zinid

    anyway, 50-100kb is a typical overhead I see in stress tests, so...

  297. Zash

    https://www.zash.se/prosody-graphs.html .... is that like 15kb/conn for tls? I might have forgotten how to read those graphs

  298. Zash

    Dat CPU usage tho

  299. moparisthebest

    but really the % matters, if that's only a 0.09% increase well...

  300. zinid

    moparisthebest, that's not 0.09% increase, in production we offload TLS because huge RAM machines are expensive, so we split the RAM between the machines

  301. Holger

    First random Google hit: > OpenSSL tends to allocate about 50KB of mem­ory for each connection. https://www.imperialviolet.org/2010/06/25/overclocking-ssl.html

  302. zinid

    why would we do this crazy shit if there was negligible overhead?

  303. Zash

    Something something release buffers?

  304. moparisthebest

    how much do you allocate for a regular XMPP connection though is what I'm wondering

  305. zinid

    Zash, the option is set

  306. moparisthebest

    my hunch is it's so much more than 50kb that 50kb is negligble

  307. Holger

    Isn't that option for freeing memory on *idle* connections?

  308. zinid

    moparisthebest, for empty roster c2s it's no more than 50kb in fact

  309. Holger

    moparisthebest: On the two servers I'm involved with it's about 300k, but those are with all bells and whistles enabled (MAM and whatnot), so it's probably less elsewhere.

  310. zinid

    It's really hard to say, because there is a crazy garbage collector in Erlang doing some weird shit

  311. zinid

    not to mention how great openssl is when you try to connect 2M :)

  312. zinid

    you need to patch it, or else it will spend most of the time in locks on a machine with a lot of CPUs