I'm looking to see if it is possible to use the memo field as a way to send encrypted messages to an account by using the receiver's public key to do the encryption. Since the receiver has the private key, they can decrypt the message on their end and since the public key is accessible to anyone we can use it for encryption.
How would one go about doing something like this using javascript as the encryption and decryption would happen on the front end?