I have just turned 17 and I have been developing in Java for a few years. Recently I have been interested in a language called rust, I have also been made aware of privacy issues by some of my friends. Mainly in order to learn rust but also to learn more about cryptography I decided to start creating an encrypted communication application (which I may never use but I would still like to do something more or less secure). The idea of the application is that you can have a (written) conversation with a friend, stored on a server... and that even if the server is hacked it is impossible (at least not too easy) to decipher the conversation.
Here is how I thought I would make the application work:
Thomas wants to send a message to Emma. Using an algorithm (which works with a couple of public/private keys), they'll generate a shared secret so that the server cannot know it. Thomas will cipher his message using the secret in a symmetric algorithm and send it to the server. The server stores all the messages. When Emma wants to read the messages, she downloads these ciphered messages and decipher them using the secret.
Now let's say Peter wants to join the conversation, he also has public/private keys. Thomas or Emma will send him (over the server) the secret ciphered using his public key. Now that he has the secret he can download and read the messages.
If I haven't been clear somewhere, don't hesitate to point it out to me. I would like the encryption algorithms to be modular: depending on the configuration of the conversation, messages could be encrypted with AES or ChaCha20, but by default I would use Curve25519 for the elliptic curve Diffie–Hellman in order to generate the shared secret and ChaCha20 to encrypt messages. Do you think that's wise? Is there any alternative to the elliptic curve Diffie–Hellman which could resist to potential quantum computers?