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!
:thinking::thinking:

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: http://omz-software.com/pythonista/docs/ios/undocumented/ecdsa.html#:~:text=This%20is%20an%20easy-to,messages%2C%20and%20verify%20the%20signatures.