I understand that in end to end encryption the message is encrypted and only the recipient has the key to Decrypt it. How is the key transmitted, and how can the key not get intercepted with the message?

  • Varen@artemis.camp
    link
    fedilink
    arrow-up
    15
    ·
    edit-2
    1 year ago

    With asymmetric encryption there are 2 keys - 1 is public (= everyone can look it up) and 1 is private (only the receiver has that key). Those are mathematically related.
    When I send a message, I use the receivers Public key to encrypt the message - so that message is only decryptable with the private key, so the recipient alone can decrypt it.

    • Karlos_Cantana@sopuli.xyzOP
      link
      fedilink
      English
      arrow-up
      3
      arrow-down
      1
      ·
      1 year ago

      How is the recipient the only one with a private key? If the key is sent with the message, then how does it determine the recipient? Couldn’t someone spoof the recipient’s credentials? What credentials are used to determine the proper recipient?

      • Varen@artemis.camp
        link
        fedilink
        arrow-up
        8
        ·
        1 year ago

        The private key never leaves the one it belongs to - if it does, then the encryption isn‘t secure anymore. If keys are sent, then the public ones, which are ‚public‘ (e.g. let me send you my public key, so you can send encrypted messages to me).

        When you create a key pair, you get which the private and which the public one is. Keep your private key, private and you‘re the only holdener.

        For advanced security, the messages (e.g. E-Mails) are secured on top with TLS, which encrypts the message on its way. If there‘s a man-in-the-middle attack, he would just see the encrypted message with no key to decrypt it.

      • moody@lemmings.world
        link
        fedilink
        English
        arrow-up
        7
        ·
        1 year ago

        Imagine a lock that requires 2 keys to work. One, the public key, can only lock it. The other, the private key, can only unlock it.

        It’s safe to share the public key since anything it locks can only be opened with the private key. So every interaction you have that needs to be kept hidden, you send out a copy of your public key, and only your private key allows you to read the message.

        Credentials are irrelevant. If you need to communicate with someone else, you send your key, they send theirs back. Anything you lock with their public key, only their private key will access.

      • intensely_human@lemm.ee
        link
        fedilink
        English
        arrow-up
        1
        ·
        5 months ago

        The recipient is the only one with the private key because they generate the private key (simultaneously with the public key) on their own computer and then they don’t give anyone else a copy.

        There is no mechanism per se that ensures only the recipient receives the encrypted message. But only someone with the private key can decrypt it.

      • HopFlop@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        1
        ·
        10 months ago

        Lets say we wanna talk. I keep a private decryption key and send you a (public) encryption key. Everyone now knows how to encrypt a message for me but nobody, not even you, can read it. The decryption ley is NEVER SENT and kept secret, the encryption key is public but can never decrypt anything.