# When is public-key crypto used / when is symmetric crypto used?

I read in the book "Cryptography & Network Security" that it has almost been universally accepted that public-key cryptography is restricted to only being used for key management (Does this mean sending symmetric keys securely using a public-key crypto system?) and signature applications.

• Can someone explain me if these really are the only cases where we use public-key cryptography?

• Also, does this mean that public-key cryptography can't be be used alone for sending messages and that for such an example we use both a public-key cryptosystem and a symmetric cryptosystem for sending for example an e-mail?

• Furthermore, can someone give me some examples of where we use public-key cryptography and where we use symmetric cryptography?

I know it is a lot of questions, but i have done a lot of searches online and in books and cannot seem to find the exact answer to my question.

One of the biggest drawback of the currently known public key schemes are the performances: it is slow. For instance, when using RSA, nowadays, one has to work with numbers in the range $\left[2^{2047},2^{4096}\right]$, which are really huge.

You've effectively understood correctly: generally, one encrypts data using a symmetric algorithm, which is fast, using a random "data encryption key" and then encrypts this key using public key cryptography.

This is the case for PGP, for instance. So when you are sending a mail encrypted with PGP, most of the time, the actual data is encrypted using AES, while only the AES key is encrypted using RSA.
This is generally called a "hybrid cryptosystem".

Symmetric encryption is effectively used to encrypt data, most of the time. This is true for all current schemes and protocols: TLS, PGP, etc. all rely on the fast symmetric encryption for the data. Asymmetric encryption (also known as public-key) is generally only used to encrypt small packets, like a key.

Another use of public-key cryptography is for signatures, but when you are signing a message, what you'll sign is actually the hash of the message, so you benefit from the speed of the hash function and the slow public-key operation are only performed on a hash.
This also means that public key crypto is at the heart of the certificates everybody uses on the internet nowadays, since those are a special case of public key signatures in order to build a "chain of trust".

Finally, you mentioned the key management, and public-key cryptography is also used there to perform key exchanges, in order to establish a common key between two parties over an untrusted channel, given that they both have each other public key. That common key is then generally used to encrypt data over that same channel with a symmetric algorithm.