• @danielfgom
    link
    English
    11 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

    • @[email protected]
      link
      fedilink
      English
      11 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
        link
        English
        11 year ago

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

        Have a great day.