I know that Diffie-Hellman is used to create keys in a secure way over an insecure channel. But there is one thing which I cannot understand: I see that a lot of sites use ECC or RSA alongside DH.

But why would you need to implement ECC or RSA if you already have a shared secret or key with each other? Can't you already use to strong symmetrical encryption?

  • 1
    $\begingroup$ Please spend a bit more time on your question before hitting the post button; we should not have to fix things like capitalization and misspelling "when", especially when "when" is in the title of the question. $\endgroup$ – Maarten Bodewes Jun 20 '16 at 22:05
  • $\begingroup$ Sorry, english is not my mother language and i have dyslexia, my apologies. $\endgroup$ – blacklight Jun 20 '16 at 22:07
  • $\begingroup$ No problem. Do try to rely on the red squiggles ~~~~~ that are created by spell checkers though. Couldn't see from your question that you are a dyslexic, so in that sense you're doing OK :) $\endgroup$ – Maarten Bodewes Jun 20 '16 at 22:25

What's missing is the authentication of the entities. If you don't authenticate the entity then you don't know who you've established the master secret with. This means an attacker can pose as a man in the middle or the attacker can simply act as one of the entities.

You can use static DH key pairs, but in that case the DH public keys must be trusted and the scheme loses the forward secrecy property.

In TLS 1.3 only DHE and ECDHE will be used for key agreement, which means that the key pairs are fully ephemeral and the forward secrecy property is indeed in effect.

| improve this answer | |
  • $\begingroup$ So the keys that they generate from the ecc are only used for authentication? $\endgroup$ – blacklight Jun 20 '16 at 21:55
  • $\begingroup$ ECDSA keys are only used for authentication yes. EC keys can also be used for ECDH(E) of course, the elliptic curve form of DH key agreement. Basically the same keys used for different purposes. $\endgroup$ – Maarten Bodewes Jun 20 '16 at 21:57
  • $\begingroup$ Basically the same type of keys of course. $\endgroup$ – Maarten Bodewes Jun 21 '16 at 19:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.