Edit: obligatory explanation (thanks mods for squaring me away)…

What you see via the UI isn’t “all that exists”. Unlike Reddit, where everything is a black box, there are a lot more eyeballs who can see “under the hood”. Any instance admin, proper or rogue, gets a ton of information that users won’t normally see. The attached example demonstrates that while users will only see upvote/downvote tallies, admins can see who actually performed those actions.

Edit: To clarify, not just YOUR instance admin gets this info. This is ANY instance admin across the Fediverse.

  • Mikina@programming.dev
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    Wouldn’t it be pretty simple to just encrypt them with the user’s password? Or rather, create a key that’s generated from the password, so you don’t have to store the actual password in cookies, and then just decrypt it on the client side?

    There will probably be issues with handling password resets, but other than that it doesn’t sound too hard to implement it, unless I’m missing something, since my knowledge of crypto isn’t anywhere near good. Should be one AES call, the way I see it.

    EDIT: Oh, I’ve forgotten that you also have to somehow encrypt the messages that you send to someone, so a asymmetrical encryption is required, and that would be way harder. Or, maybe just store a public key, and encrypt the private key with your password, which is loaded into local storage and decrypted with your password once you log in? Still, that’s not as easy as I thought.

    • barsoap@lemm.ee
      link
      fedilink
      English
      arrow-up
      4
      ·
      1 year ago

      You log yourself into your instance using your password, using code that the instance sends you. Thus it is trivial for a sufficiently motivated instance admin to get your password in plain-text and undo any encryption that might be done on the private key stored on that instance.

      To be actually secure you have to store the key separately, not use a webapp, etc. Solutions for that exists but aren’t really in the scope of a link aggregator which is why I think “send a message the recipient’s instance admin can see” is fine, ideally replaced by “send an actually secure message” if the recipient has gone through all the set-up hurdles, e.g. linked an address on an actually secure messaging service.

      • Mikina@programming.dev
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        You are right. A solution that would keep messages secure and hidden from an instance admin will have to use a solution that’s not under the control of the said instance admin, and you might as well just use PGP for that manually. But now I’m wondering how does e2e encrypted services such as Protonmail do that, so you can be sure that they don’t have access to your data. I’m assuming there can’t be any guarantee, unless you have your keys separated from the app and do your encryption before you let the app touch it.

    • Waltzy@lemdit.com
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      On encrypting messages, this is a solved e2e problem if users home instances generate public private key pairs for its users on sign-up ( or users can provide their own )

      • JasonDJ@vlemmy.net
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 year ago

        Then the instance admin holds the private key and can still decrypt.

        If you cared that much about privacy in DMs, we should have a “profile page”. Post a PGP public key there. Then you can send PGP encrypted messages to anyone who you have a public key for.

        • Waltzy@lemdit.com
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          1 year ago

          Aye, my proposal was a trade off between privacy and convenience for non technical users ( it’s only as bad as a non federated social media site).

          The best balance here would be a client on the user device that manages the keys for you, and an API in lemmy for accepting and sending encrypted messages.

          As a side note, I thing PGP is more or less superseded by AGE

    • Waltzy@lemdit.com
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      Tbh it would be trivial to just salt and hash the usernames (for keying the votes), no need to encrypt or involve the users password. The salting and hashing would be handled by the users home instance ( which presumably the user trusts ) so building a rainbow table would be non trivial for an attacker ( assuming the home instance keeps its salts secret ).

      • Mikina@programming.dev
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 year ago

        I like this idea. Easily solves the main issue with other instance admins getting access to it, while also being easy to implement.

        • barsoap@lemm.ee
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 year ago

          Another option would be to aggregate votes per instance so programming.dev might only see “42 upvotes from lemmy.world”, but not user details. I don’t think that changes the inter-instance trust equation, at least not notably, and it even works in conjunction with non-aggregated upvotes and displaying everything publicly.