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?

You are viewing a single thread.
View all comments
1 point

You are talking about the Alice and Bob situations.

Alice has a pair of keys. Private and public.

Bob has a pair of keys private and public.

Bob and Alice swap public keys.

Alice uses bobs public key to encrypt a message, when Bob receives the message he uses his private key to decrypt the message.

The private keys that do the decryption are never swapped. Only the public key are swapped which allow encryption.

If some else has bobs public key, they can not decrypt a message because the key they intercepted is used for encryption.

There is also another method called a Diffie-Hellman exchange. Where Bob and allice still swap public keys but Bob uses his private key and allices public key to do a maths equation to get a secret. Allice will use her private key and bobs public key doing the same math equations will result in the same number.

So the secret was never shared between them they both did the same equation and came to the same result.

permalink
report
reply
0 points

With Diffie-Hellman, wouldn’t the two private keys need to be the same to give the same result?

permalink
report
parent
reply
2 points

The two private keys represent two channels of information flow. One channel for each direction.

When Alice talked to Bob, they’re using Bob’s keys. When Bob talks to Alice, they’re using Alice’s keys.

If it’s a “two-way” conversation, that’s just two separate one-way channels being combined at the end into what seems like a single, two-way channel.

permalink
report
parent
reply
1 point

No. The wiki article explains it better than I can.

https://en.m.wikipedia.org/wiki/Diffie–Hellman_key_exchange

permalink
report
parent
reply

Explain Like I'm Five

!explainlikeimfive@lemmy.world

Create post

Simplifying Complexity, One Answer at a Time!

Rules

  1. Be respectful and inclusive.
  2. No harassment, hate speech, or trolling.
  3. Engage in constructive discussions.
  4. Share relevant content.
  5. Follow guidelines and moderators’ instructions.
  6. Use appropriate language and tone.
  7. Report violations.
  8. Foster a continuous learning environment.

Community stats

  • 583

    Monthly active users

  • 90

    Posts

  • 1.1K

    Comments