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

    Yeah as the previous commenter said, e2e encryption just doesn’t allow anyone to access the data but the owner of the keys. E2E is prized because of this. There are two keys: public and private. If you and I are both using iMessage, you send a message to me that is encrypted on your device using your private key, and sent to my device using my public key. Only you and I can ever see those messages unless someone gets access to one of our phones.

    Now, iCloud is backed up to apples servers. If you have iMessage backup enabled, it’s possible, and maybe even likely tbh, that Apple has access to recent messages. iMessage is also (potentially, but again in this case, I’d argue likely) susceptible to man-in-the-middle attacks. Because you need my public key for our communication to be decrypted, if you receive some else’s public key instead, they now have your messages and I don’t.

    The DEA and FBI have both had documents leaked mentioning they can’t track or trace or unencrypt iMessage. The same is true for WhatsApp or any e2e messaging service.

    Again, this is all contingent on not using iCloud backup. If you use iCloud backup, then the encryption keys used can be accessed with the proper authority. I assume (but haven’t looked into it) that Google is the same. If you don’t backup your e2e encrypted content, it cannot be decrypted without the private key only you have access to. Of course iCloud backup is enabled by default, so for the vast majority of Apple users, their messages and information are all available anyway so none of this matters.

    In addition, iMessage uses a directory lookup to find the correct public key for your recipient. This information Apple does keep (I am unsure how long). What this means is that law enforcement (with a warrant) can see who and how often you are messaging. That alone is information we really don’t want people having.

    So the moral is: if you don’t use backups for e2e encrypted communication, your content cannot be read externally. It’s just the way cryptography works.

    This doesn’t mean that companies do not share information with law enforcement. There is a lot of unencrypted information Apple, Google, et al will share with government agencies when a warrant or subpoena is served. In addition to that, your phone provider will share information with them. In addition to that any SMS or MMS messages sent from any device will lack encryption and be easily discoverable.

    Tl;dr: e2e encryption is secure, as long as you follow best practices and have an idea of how encryption works.

    • danielfgom@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      Just a thought: how can the public key unencrypt something that was encrypted with a private key? Wouldn’t the receiver need the same private key that was used to create the encryption.

      Normally I’d encrypt a hard drive, for example, you’re asked for a password to decrypt it again. And it also generates a long recovery key. If I try to decrypt with the wrong password, it won’t decrypt.

      Another thought: surely the sender must be sending the key to the receiver via a server (eg WhatsApp or iCloud)? If so what prevents that server from keeping a copy of the key and the message for future decryption by law enforcement?

      Thanks

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

        The public key doesn’t decrypt the information. The public key is used only for encryption. The private key is what is used for the decryption. Since the private key is on-device, there’s no way to get access to the decryption. It’s actually a bit more complicated than I wanted to go into for an already ridiculously long comment, but I’ll explain a bit more here.

        With a hard drive, you have one key. This kind of encryption is called symmetric encryption. It uses a single private key, and that key can be used to decrypt at any time.

        E2E encryption uses what is called asymmetric encryption. The key used to encrypt the information is actually the recipients public key. This is where some information is exposed to Apple (or anybody else who uses a directory lookup to find a public key). That lookup tells Apple who and how often you are messaging. This they will absolutely give to law enforcement with a warrant. It doesn’t tell a lot, but it does give information about your correspondence.

        Once the information is encrypted, the matching private key is the only thing that can decrypt the content. This also places a vulnerability because if somebody sends a different public key, now the message is decryptable by the bad actor.

        So because of the two key system, the private key for each individual is inaccessible to anyone except the individual. It’s actually a really cool concept. This is how HTTPS functions as well. TLS (it’s just the cryptographic protocol HTTPS uses) creates a secure connection using asymmetric encryption. The information it sends then uses symmetric encryption.

        I’m a developer, and not an information security expert, so some of this may not be completely accurate, but it should be accurate for the most part. If you’re interested at all I would definitely suggest looking into it because I think it’s super neat.

        Of course if you have any more questions I’m willing to talk as well.

        • danielfgom@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          Thank you for taking the time to reply. I think I need to get read up on this.

          Have a great day.