# Asymmetric Encryption vs Shared secret via ECDH

I'm reading RFC8291. Here's a figure on how Web Push Notifications work in general:

    +-------+           +--------------+       +-------------+
|  UA   |           | Push Service |       | Application |
+-------+           +--------------+       +-------------+
|                      |                      |
|        Setup         |                      |
|<====================>|                      |
|           Provide Subscription              |
|-------------------------------------------->|
|                      |                      |
:                      :                      :
|                      |     Push Message     |
|    Push Message      |<---------------------|
|<---------------------|                      |
|                      |                      |

Figure 1


Then, RFC8291 adds cryptography on top of it. If I understood correctly:

1. In the "Provide Subscription" step, the User Agent (UA) and the Application both agree on a shared secret using ECDH.
2. Then, when the Application wants to send a push notification to the UA, it encrypts symmetrically (via AES) the notification content using the shared secret.
3. The Push Service relays this encrypted notification to the UA.
4. The UA decrypts the notification content using the shared secret.

My question is: why use ECDH when simple asymmetric encryption/decryption can be used?

1. UA generates a private/public key pair.
2. In the "Provide Subscription" step, the UA sends its public key to the Application.
3. The Application, when it wants to send a push notification, encrypts the notification content with UA's public key.
4. Same as before, the Push Service, relays the encrypted message.
5. The UA decrypts the encrypted notification content with its private key.

What are the trade-offs between the method I described here, and the one in the RFC?

• Apparently the designers preferred not having to perform asymmetric cryptographic operations for each push notification... – SEJPM Sep 20 at 17:54