0

I implemented a simple chat that (tries to) encrypt messages end-to-end. I approached this problem by making both parties generate an ECDH keypair (P-384) and consequently share their public keys. Then, using one's own private key and the other's public key, I derive an AES shared key to encrypt and decrypt my messages. Assuming this is running on HTTPS:

  • Is this a reliable end-to-end encryption?
  • Is the additional encryption bad because I'm already using HTTPS?
  • I'm not sure if I need HMAC and if so, how do I add it to my system?
  • Can this be used for a conversation with more than 2 parties?
Soufiane Tahiri
  • 2,657
  • 15
  • 27
BinarSkugga
  • 341
  • 2
  • 8
  • When do you rotate AES shared key? Do you address post-compromise security? https is for client to server security and e2e is for user to user. You need both. – defalt Jan 25 '21 at 19:18
  • How does each side know it has the correct public key for the other side rather than the public key of an attacker impersonating each person to the other? – David Schwartz Jan 25 '21 at 19:30
  • I do not rotate the AES key but I added it to my todo. For the public key, I looked up how to validate this and I'm not sure how to proceed. At first I thought HTTPS was protecting me against this but it seems not. Should I generate the keys using a passphrase ? – BinarSkugga Jan 25 '21 at 20:04
  • You can use Signal protocol library. It has everything implemented for what should be there in e2ee. – defalt Jan 26 '21 at 06:29
  • Except the goal of the project is to do it myself. So no but I will read on it to know how they achieved some of my current roadblocks. – BinarSkugga Jan 29 '21 at 19:49

0 Answers0