0
$\begingroup$

I am new to cryptography and I cant get my head around this issue:

If symmetric cryptography is faster then asymmetric and given that Diffie-Hellman key exchange algorithm allows you to exchange keys safely why bother using Asymmetric cryptography if I can exchange symmetric keys safely ?

$\endgroup$
4
  • 1
    $\begingroup$ Asymmetric Encryption is used mostly only for Key Exchange. It's always Symmetric Encryption which is used to encrypt traffic once the key is exchanged. $\endgroup$
    – user93353
    May 25, 2022 at 12:46
  • 1
    $\begingroup$ DH "only" works when you're actively communicating with another party. There are many instances when that's not the case and a different mechanism is needed. Think about email encryption. Email is store and forward, so how do you encrypt the data there without using a preshared symmetric key? $\endgroup$ May 25, 2022 at 14:05
  • $\begingroup$ Static-ephemeral DH works just fine for email message encryption. $\endgroup$ May 25, 2022 at 21:49
  • $\begingroup$ @user93353 so my guess was correct, thanks i appreciate the answer. $\endgroup$
    – ezio
    May 26, 2022 at 9:00

2 Answers 2

1
$\begingroup$

As mentioned in the comment by user93353, asymmetric cryptography is mostly used for symmetric key exchanging and signing of messages. I will give a simple explanation of the need for asymmetric cryptography.

Image a complete graph $G$ with $n$ nodes in which every node needs to communicate with each other. If we use symmetric encryption we need $O(n^2)$, a key for every edge. If we use asymmetric encryption we need $O(n)$ keys. As you can see symmetric encryption doesn't scale well. I have seen it in some cryptography textbooks referenced as The squaring problem. The simple solution to this one is whenever a node needs to communicate with another node to generate a shared symmetric secret key and use it for onward communication. This is what TLS does basically.

$\endgroup$
1
  • 1
    $\begingroup$ $n^2$ is the shortening of the long problem. One needs a certificate to mitigate the MITM attack on DH. Similarly, you need the certificates for the signature verification, too... $\endgroup$
    – kelalaka
    May 26, 2022 at 10:20
2
$\begingroup$

Asymmetric Cryptography was the start of a new era in cryptography.

Diffie-Hellman key exchange is asymmetric cryptography.

We also use digital signature algorithms. These allow someone with a private key to digitally "sign" a message, such that anyone with the corresponding public key can verify that the signature was made on that message by that private key. This allows proving the authorship of messages and provides the non-repudiation. The non-repudiation is only possible with asymmetric cryptography and Rabin Signature Scheme was the first genuine digital signature.

Key exchange and digital signature schemes are the most common use of asymmetric cryptography.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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