Chat Dapp decentralized

Hello is there any way to encrypt conversations if I do a decentralized chat? , in which only the 2 parts of the conversation can read it!

Maybe use E2E encryption like in WhatsApp and store the encrypted data on the blockchain.

you can use asymmetric cryptography where you can encrypt data using receivers public key and the receiver can only decrypt it using its private key.

Check on ECDSA cryptography:,messages%2C%20and%20verify%20the%20signatures.