Send Encrypted Message
Sending an encrypted message to another is account is almost identical to , but with two very important differences:
- You need to use the agreementPrivateKey
- You need the recipients public key. (See also )
Encrypted messaging uses a Diffie-Hellman-Key-Exchange to guarantee that no secret must be sent over the network. That's why encrypted messages are only readable by the sender and the receiver.
Smart Contracts do not have public keys, so they are not able to process encrypted messages.