I'm attempting to setup client/server communication for an application via libsodium. So far I plan to distribute the application with a hard-coded public key. The server will keep its secret key without ever sharing it. This should let users encrypt messages and send them to the server, where the secret key decrypts messages.
In the event the secret key on the server is ever compromised (I'm not sure how, but just in case) how might one distribute new public keys to all clients? Is there a way to generate a new secret key without requiring distribution of new public keys? Something like:
make_new_secret( secret_buffer, previous_public );
I was hoping for a very simple solution that wouldn't require complicated algorithms for securely handing out new public keys. If making a new private key must be done while also making a new public key, what algorithms may be used to securely distribute public keys from server to clients?
Additional info (feel free to skip):
We can read here where Glenn Fiedler (author of libyojimbo, which uses libsodium) talks about the idea of "just roll a new private key".
If there is a way to re-use old public keys and create a new private key with libsodium, I would love to read about it. I have went through the docs and have yet to see any functions to do so. So I fear I may have to delve into more complicated algorithms for securely distributing new public keys.
I have checked out Diffie Hellman, but it seems to require both parties to start with a common "color". So I suppose my question is in regards to coming to a new agreed upon starting color.