XSF Discussion - 2019-01-01


  1. Guus

    Same to you, Seve!

  2. edhelas

    Happy new year to you all 🎉🎆

  3. Ge0rG

    XEPpy new year!

  4. mathieui

    zimpy new year to you, Ge0rG

  5. Neustradamus

    Happy new year to all

  6. Syndace

    It seems like some clients allow sending OMEMO encrypted messages even to untrusted entities. I'm not sure whether I want to allow that in my library. Any pros/cons?

  7. Syndace

    Starting off the new year with a nice little OMEMO discussion :D

  8. lovetox

    that makes not much sense

  9. lovetox

    if you want to do that add another trust state

  10. lovetox

    called Undecided or whatever

  11. lovetox

    but in general i would not advise to add an option to every crazy idea a developer gets

  12. lovetox

    he can implement this on top of the lib

  13. lovetox

    in my opinion the lib should only know, should i prevent sending this or not, True or False, and this info should be supplied by the client depending on the context

  14. pep.

    I have wrongly fed Syndace with false information. I thought Conversations was allowing that, but no it does force me to trust before sending. I have "Blind Trust Before Verification" unchecked, I don't know if that happens in general

  15. pep.

    lovetox, "if you want to do that add another trust state", this is only possible in the client, not in the OMEMO lib, maybe in the XMPP lib

  16. Syndace

    pep.: That's fine, I was still interested in other peoples opinions about that.

  17. lovetox

    Gajim lets you also send a message if you dont trust every device, why not?

  18. Syndace

    lovetox: Thanks, that's exactly what I thought. If someone really wants to allow that, he can circumvent my libs trust management and create his own.

  19. lovetox

    that does mean the message is encrypted to THAT device

  20. lovetox

    Syndace, he does not need to circumvent it, your lib does not implement storage or?

  21. Syndace

    lovetox: My lib does it all ^^

  22. Syndace

    Including some trust management.

  23. oli

    Syndance: what harm does it do to encrypt untrusted entities? https://tools.ietf.org/html/rfc7435

  24. lovetox

    hm where Syndace dont see it in the code

  25. lovetox

    you have a storage api, you dont implement the backend

  26. lovetox

    so you dont control what gets stored and where

  27. lovetox

    so i can manipulate this on write and on read

  28. lovetox

    your lib never knows whats stored in thedb

  29. Syndace

    Which is essentially circumnventing the trust management, right

  30. lovetox

    and i can implement 10 truststates and save it to the db

  31. Syndace

    Just what I was saying

  32. lovetox

    and on in read i just manipulate it so that i translate it to something that your lib understands

  33. Syndace

    Aure

  34. Syndace

    Sure*

  35. lovetox

    thats not circumventing it in my opinion, i use the api the lib provides

  36. lovetox

    you no where define in what ways i have to use it

  37. lovetox

    but thats splitting hairs

  38. Syndace

    Well you can't use the trust and distrust of the SessionMamager

  39. Syndace

    Which is the official public API to do trusting

  40. Syndace

    Okay so back to the topic. You guys say that it's a good idea to always allow even unauthenticated encryption?

  41. lovetox

    see thats maybe a option, to make that IsThisTrusted method be overwritten by the client

  42. lovetox

    if he wants

  43. lovetox

    are keytransport messages sent only if the contact is trusted?

  44. Syndace

    Yep

  45. lovetox

    see thats where i would want to send maybe a keytransport message even to contacts i have no trust to, or not decided yet

  46. lovetox

    there is no harm in that for the user

  47. lovetox

    and i can answer a prekey message instantly, without asking the user for trust

  48. pep.

    Ok so in reality it's not "sending to an unstrusted device", it's the client that tells the OMEMO lib "I trust this device", even in an "undecided" state

  49. Syndace

    I think this is where the "blind trust before verification" concept comes into play

  50. lovetox

    No Syndace it means something different

  51. lovetox

    bbtv means i trust the client with everything

  52. lovetox

    i just want to establish a session and answerr a prekey message

  53. lovetox

    either way, to answer your question as you see, clients want to do different things, so maybe your isTrusted() method, should be able to be overwritten

  54. lovetox

    so clients can implement their own concept of what is trusted and what not

  55. pep.

    yeah, trust management is done on the client

  56. pep.

    I mean,

  57. pep.

    I can tell the OMEMO lib whatever I want

  58. pep.

    The lib keeps the state

  59. Syndace

    lovetox, just making the isTrusted method overwritable doesn't fix the issue I'm afraid

  60. Syndace

    You would need additional info like "this is the first keytransportmessage in response to a prekeymessage"

  61. Syndace

    To allow for complex trust stuff like you described

  62. lovetox

    Syndace, it was not a real code proposal, you know your lib, it just was to describe the concept

  63. Syndace

    Sure I get that

  64. Syndace

    I'm just thinking about how I could make such use-cases possible

  65. lovetox

    hm i would not focus on the example i have given, just how to solve it generic

  66. lovetox

    you lib loads a trust from the db

  67. lovetox

    1. do you expect a certain value here? maybe ints 1, 2, 3?

  68. lovetox

    2. and some where down the line you evaluate what you loaded in your isTrusted()

  69. Syndace

    Yeah but that's the thing, a generic solution must also allow to implement the example you gave.

  70. lovetox

    so why not pass what was loaded from the db (which could be anything you dont have to care) to the client in a isTrusted() call

  71. lovetox

    and the client returns True or False

  72. Syndace

    And I don't see how to do that without a ton of information about the whole context of that message/conversation

  73. lovetox

    so pass another info, for what the trust is used

  74. lovetox

    KeyTransport or Message

  75. lovetox

    i mean there is only these 2 or?

  76. lovetox

    but yeah i see it gets more complicated

  77. lovetox

    hm or maybe easier

  78. lovetox

    the client invokes the encryption or not?

  79. lovetox

    maybe it can pass a "ignore_trust=True"

  80. lovetox

    on that one encryption

  81. lovetox

    for the key transport message

  82. Syndace

    Hehe that's what I had before

  83. lovetox

    yeah but then its fine for the example ive given

  84. Syndace

    right.

  85. lovetox

    i can send a message if i really have to

  86. Syndace

    I guess that's the road I have to go down again.

  87. Syndace

    Okay, so now there is a new question

  88. Syndace

    Let's only look at messages, that have actual content. A text message and not an empty KeyTransportMessage. Is there any reason to allow sending such messages to untrusted entities?

  89. lovetox

    i think we have to define what untrusted means

  90. lovetox

    for me and in gajim

  91. Syndace

    I could allow that *only* for empty KeyTransportMessage used ti do some ratchet forwarding

  92. lovetox

    untrusted means, the user set the state to RED - UNTRUSTED himself via UI

  93. lovetox

    i personally see no reason to encrypt anything to that device ever

  94. lovetox

    but maybe someone has another idea

  95. lovetox

    then i have another state in Gajim, it is orange and means UNDECIDED, i received a message from that unknown device

  96. Syndace

    For me untrusted is everything that is not explicitly trusted. That means undecided also means untrusted.

  97. lovetox

    the user had no time to make a trust decision, or he wants to delay it, because i wants to physically check the fingerprint

  98. lovetox

    and then there is Trusted and blind trust, but it should be the same for the lib

  99. lovetox

    i specifically care about that Undecided state

  100. Syndace

    In the undecided state, does Gajim send encrypted text messages to those devices?

  101. lovetox

    but it would work for me, if i can just pass a ignore_trust=True on the key transport

  102. lovetox

    no, syndace, but it can receive messages

  103. Syndace

    Receiving is a different topic

  104. Syndace

    I allow decryption from untrusted entities

  105. lovetox

    so no, messages are not encrypted to undecided devices

  106. Syndace

    Okay. And I feel like this is the behaviour I see around clients

  107. Holger

    I think 'trusted' devices should be those I send messages to. So there's no 'undecided' state here. I either send or send not messages to a device.

  108. Holger

    The other thing is verified vs. unverified.

  109. lovetox

    You speak as a User Holger, and yes i agree because with message you mean text message

  110. lovetox

    but there are protocol messages, where no user data is sent

  111. lovetox

    and i see no problem sending these to undecided devices, there is no harm

  112. Syndace

    So can we agree that empty KeyTransportMessages should be available no matter the trust status and everything else (with actual content) is only available if you explicitly trust?

  113. Holger

    lovetox: Right.

  114. lovetox

    i think this is sensibel Syndace

  115. Syndace

    Cool! Thank you :D

  116. oli

    From a users perspective I want green - verified yello - unverified red - blocked

  117. oli

    so if you don't allow omemo messages, would non-encrypted messages also be blocked?

  118. Syndace

    oli: Non-encrypted stuff is not affected by anything OMEMO

  119. Syndace

    so no

  120. lovetox

    Syndace, is a lib author, he has zero to do with client UI

  121. oli

    I just wanted to write that I don't see the reason to refuse sending OMEMO messages to untrusted devices at all.

  122. oli

    (if none of the fingerprints of the JID is trusted)

  123. oli

    but I realize that you kind of sign the encrypted message.

  124. lovetox

    we have to take care what the terms mean, untrusted means for you, you didnt trust but also not block, but in Gajim untrusted means blocked

  125. lovetox

    Syndace, maybe thats also a good idea, to write this down in your documentation, what untrusted means in the context of the lib

  126. lovetox

    especially that it doesnt mean "Not Trusted Yet"

  127. lovetox

    aka Undecided

  128. Syndace

    oli: I understand what you mean, I had a little read on the RFC you linked. I think that BTBV is basically the TOFU described in that RFC. But I don't think it is the job of my library to do that, but a per-client choice to go with that behaviour.

  129. Syndace

    lovetox: Yes agreed, I need some documentation about thst

  130. lovetox

    also we should move this to jdev channel, as this has not much to do with XSF or standards :)

  131. oli

    For Gajim: I think it would be nice to be able to have en encyrypted chat even with an "Not Decided" fingerprint. This gives users the opportunity to really check the fingerprint. If you prevent encryption in undecided state, users just click trusted to be able to chat.

  132. lovetox

    thats what you use verified/unverified states for in my opinion

  133. oli

    lovetox: bi

  134. oli

    but i cannot send OMEMO messages in undecided state

  135. lovetox

    im not saying that Gajim offers such states

  136. lovetox

    im just saying if i would make this possible i would introduce verified/unverified states

  137. oli

    I feel this has to do XEP-0384: "Clients MUST NOT use a newly built session to transmit data without user intervention. If a client were to opportunistically start using sessions for sending without asking the user whether to trust a device first, an attacker could publish a fake device for this user, which would then receive copies of all messages sent by/to this user." The most popular mobile client just gives a shit about this (in the default configuration)

  138. pep.

    Yes that's something I also dislike in conversations, that it forces me to trust before sending (with btbv unchecked, dunno about other states), even though I didn't actually verify the fingerprint

  139. jonas’

    to be fair, this MUST/MUST NOT is not sensible because it’s not an interoperability thing, but a policy thing

  140. oli

    lovetox‎: sorry, missread you message unverified != undecided

  141. lovetox

    oli, if you refer to conversations

  142. lovetox

    its Daniels client

  143. lovetox

    and Daniel wrote the xep

  144. lovetox

    and its not a standard, its experimental

  145. lovetox

    so if the author feels like it he can change that every day

  146. jonas’

    does xep-0384 reflect what’s actually done on the wire these days?

  147. lovetox

    The XEP should be updated, but i think they work on a bigger overhaul

  148. lovetox

    actually andi is listed as author, didnt know that

  149. pep.

    Yeah, there's probably going to be a big breakage soon.

  150. pep.

    That's going to be fun

  151. jonas’

    "soon"

  152. pep.

    in terms of standard progress :P

  153. oli

    Why breakage? With all the X and the namespaces, sholdn't breakage be avoided?

  154. oli

    But as long as the cult of OMEMO believes in the evilness of OTR, everything will be fine.

  155. jonas’

    nobody believes OTR is evil

  156. lovetox

    its just not practical for todays messenger needs

  157. lovetox

    xmpp clients have mostly a big usability deficit, and everything that cant be made really stable/easy/usable for users, i would right now not invest my time into

  158. jonas’

    in the single-client, non-mobile use-case OTR is extremely usable

  159. Neustradamus

    And there is an OTRv4 in progress since a big moment...

  160. Zash

    I looked at the streamed talk from CCC. They said no multi-client support, so still terrible for XMPP.

  161. pep.

    No multi-client and no groupchat

  162. pep.

    They're introducing PFS though, and using doubleratchet, but this is still not a replacement to OMEMO

  163. pep.

    (Even if we defined a way not to have all that in <body/>, and how to translate if for transports etc.)

  164. oli

    Would work for a whatsapp-like model (besides the group chat)

  165. lovetox

    groupchat is an essential part of whatsapp

  166. lovetox

    so no it would not work at all

  167. pep.

    But I guess the advantage that they want to have over other mechanisms is that it doesn't require any server nor protocol support

  168. pep.

    So that's actually a feature for them to use <body/>

  169. Zash

    Something something trade-off

  170. oli

    lovetox: i mean there is no multi client in whatsapp. it seems multi client is not really that important

  171. lovetox

    It is thats why whatsapp trys really hard to fake it

  172. lovetox

    A separate desktop client was always one of the major requests from whatsapp users

  173. lovetox

    then they offered their web thingy, and last time i looked they had a desktop client on mac

  174. lovetox

    i actually dont know if this is real multi device, or if its still proxied over the phone

  175. pep.

    That goes through the mobile though right?

  176. lovetox

    is this still the case?

  177. pep.

    I don't know I don't use it

  178. pep.

    I thought that's how signal did it at least

  179. lovetox

    maybe they solved that problem