I’m implementing an encrypted messaging web app using JS. When composing a message, the user is provided with the public key of the recipients. A body field is also rendered for every recipient. After the user clicks submit, the original message is encrypted with the recipients’ public keys, which is then inserted into their respective body fields.
Since every user has their own body field (the ciphertext varies between users), a malicious user could write a different message for every recipient. How should I go about tackling this problem?