• cadekat@pawb.social
    link
    fedilink
    arrow-up
    3
    ·
    5 days ago

    Yeah… Key distribution is hard. My natural inclination is to use something like ENS, but there’s no way anyone would accept that 🤣

    • tal@lemmy.today
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      5 days ago

      There’s also one other issue that some instances presently rely on rewriting comments. Lemmy.today does so, for example: this is done to deal with a separate issue where one can cause a user’s IP address to be exposed. I raised the original privacy issue some time back and have more discussion there.

      It’s possible for an attacker on the Threadiverse to send a direct message or a comment to a victim user that contains an inline image, where the image is hosted on a server that the attacker controls. The victim’s client or Web browser will then automatically load that inline image directly, handing the victim’s IP address to the attacker.

      This was worked around on Lemmy by having the user’s home instance — if set up to do so — act as a caching proxy for inline images for users on that home instance, while rewriting the comment to point at the local proxy. That way, only the home instance’s IP address is exposed to a potential attacker.

      That solves the problem exposing a user’s IP address. However, it also means that (a) the chain of trust is broken for the image, and (b) that because the comment is modified, even if the original comment were signed by the user, the comment body text would fail a simple validation.

      In theory, as long as this rewriting were done in predictable ways, one could have validation of comments do a reverse transformation (converting a proxy link back to a non-proxy link), which would address (b), and I suppose that theoretically, a user could also include a cryptographic signature on files that they link to, which would address (a).

      But if we start getting more automated rewriting of comments in a variety of ways and start relying on that rewriting, it’s going to become more-difficult to cryptographically-authenticate comments.

      I don’t know what other Threadiverse server implementations, like Mbin and PieFed, presently do around exposing user IP addresses, whether they rewrite comments or not.

      • cadekat@pawb.social
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        5 days ago

        You could work around that by signing the hash of the attachment I suppose.

        The UI for rewriting messages could be simple enough. You’d display the altered message with a signature from your home server, and have a “view raw” that displays the original signature?