0

I am creating a chat app. This app contains private messages and channels. These channels include more than one user.

I want to encrypt messages using AES and to transfer the AES key to users of this channel.

I need a secure transport channel so I used Diffie Hellman. The problem now is how will I get users to generate the same Diffie Hellman keys so that I can create a shared key which will be the AES encryption key? I have learned the encryption, but between a sender and a receiver only, but here I have more than one sender and more than one receiver.

I had an idea, to make for all users who share the same channel, the same public and private key. Any user who opens the channel takes the public key from the channel and with his own keys he generates the shared key which forms the AES key. A user can encrypt and decrypt any message, no matter who sent it because all users of this channel have the same keys.

Any other ideas?

Note: My teacher has restricted me to use either AES encryption or Diffie Hellman, so is there another algorithm better than Diffie Hellman to do this?

schroeder
  • 123,438
  • 55
  • 284
  • 319
HUS.97
  • 41
  • 3
  • Who is requiring you to use AES but not Diffie Hellman? – schroeder Aug 22 '20 at 07:19
  • You also might want to note that this is a follow up to your previous question: https://security.stackexchange.com/questions/237263/rsa-key-exchange – schroeder Aug 22 '20 at 07:20
  • @schroeder. My teacher . he didn't require me to use diffie hellman ,he gave me the choice .the previous question was about users Here I am talking about the channels, so there is no connection with the previous question. – HUS.97 Aug 22 '20 at 07:47
  • This really looks like this is about users. "Channels" is just a dynamic selection of users ... – schroeder Aug 22 '20 at 08:23
  • Potential duplicates: https://security.stackexchange.com/questions/174647/end-to-end-encryption-with-multiple-users and https://security.stackexchange.com/questions/126768/which-protocols-exist-for-end-to-end-encrypted-group-chat and https://security.stackexchange.com/questions/204295/end-to-end-encrypted-group-chat-considerations – schroeder Aug 22 '20 at 08:53

0 Answers0