# Reuse of a DH / ECDH public key

I was wondering whether it is safe to use the same DH or ECDH key pair in more than one key agreement, particularly if these public keys are in a public registry. These public keys could be used by your counterparts (who also have their public keys in the same registry) to agree on a secret used to send you a message, even when you're not online. A user's public (EC)DH key is changed each time s/he goes online.

Is that system safe? Does reusing the same public key makes it more easy to solve its DLP?

EDIT : When I meant to use a public key in more than one key exchange, I meant it will be used with different counterparts.

-

Using DH when both sides have static public keys (always send the same message when running the DH protocol) doesn't make DLP easier. It does increase the value of the secret key.

There are some things to worry about. If the DH shared secret or one of the secret keys is compromised, the compromise is complete. This is mitigated if the static public keys are replaced often.

In ordinary DH, the shared secret is a one-time secret. With static public keys, you have a multiple-use secret. You need to be very careful when using this key.

You should also be aware that DH where only one side has a static public key is essentially equivalent to ElGamal encryption...

-
So, by having "static" public keys, I loose the perfect forward secrecy. But by rotating keys on each user connection, I still have (not perfect) forward secrecy. Is that right? –  Syrian Watermelon Oct 13 '13 at 21:22
You also become subject to chosen-ciphertext attacks and malleating attacks. $\hspace{1.63 in}$ –  Ricky Demer Oct 14 '13 at 0:27
I don't think there's a clear and accepted distinction between forward secrecy and perfect forward secrecy. I wouldn't expect anyone to call what you have forward secrecy. But as I said, the problem of not having forward secrecy (a not very descriptive term) is mitigated by rotating keys. –  K.G. Oct 14 '13 at 6:41
Ok thanks @K.G. :) –  Syrian Watermelon Oct 14 '13 at 9:16