Arbitrary messages
Description
Transmission of data messages up to 1000 bytes in length from any account to any other account. In Ardor this feature is restricted for child chains such as Ignis. It is also possible to send messages encrypted, allowing a third party to decrypt the message using a unique shared key for each message.
Details
Arbitrary messages are limited only by length. Any string can be transmitted, using any data structure or form of data encryption. Encoding, decoding, linked messages, data structures, and more can be implemented by any application that uses the system. For instance, it can be implemented groups ids, sequencing, message and correlation ids linked to the transaction, offsets, and so on to have a complete messaging system. Parsing of the messages is part of the end-party distributed applications.
Each arbitrary message has a shared key that allows a third party to decrypt the messages that were encrypted.
The base implementation allows for the transmission of simple, unencrypted text messages between accounts, but since the messages are truly "arbitrary" the range of possible applications is vast. Secure messaging, torrent applications, voting systems, data storage systems, and even simple distributed applications have been suggested.
How To
Sending a message
- When sending a message using your local node the Ardor software must be running, then browse to http://127.0.0.1:27876/ and log in to your account providing your passphrase. It is also possible to connect to the testnet or to the testnet node of Jelurida to test this feature
- Select a chain that has the messages feature enable (ie: Ignis)
- The "Messages" section and a "Send Message" button on top will appear. Click on the "Send Message" button and a modal will pop-up
- Complete the modal form shown below with the following entries:
- Recipient: The account that will receive the message
- Message: The message you would like to send (up to 1000 characters)
- Note:: This message is encrypted by default, which means the recipient must know how to decrypt the message once they receive it. To submit the message as plain text, you must manually select this option. The “messaging” feature is simple and open-ended on purpose to allow other developers to create more advanced tools and applications.
- Fee: Expressed in child chain tokens such as Ignis. Enter the fee you are willing to pay for this transaction. The minimum fee in child chain tokens must be equal to 0.01 ARDR (see Fee Structures).
- Passphrase: Your account passphrase.
- Click "Submit"
- The server will respond with the box "Your message has been sent". Afterwards, the transaction will be shown in the "My Transactions section of the user interface"
- When the transaction is confirmed, it will appear in the "transactions" block in your client interface
Sending an encrypted message
- Follow the instructions 1 and 2 from the previous section above.
- Complete the modal form shown below with the following entries:
- Recipient: The account that will receive the message
- Message: The message you would like to send (up to 1000 characters)
- Encrypt message:: Check this box. The sender and recipient accounts must have published their public keys before this operation.
- Fee: Expressed in child chain tokens such as Ignis. Enter the fee you are willing to pay for this transaction. The minimum fee in child chain tokens must be equal to 0.01 ARDR (see Fee Structures).
- Passphrase: Your account passphrase.
- Click "Submit"
- The UI will respond with the box "Your message has been sent". Afterwards, the transaction will be shown in the "My Transactions section of the user interface"
- When the transaction is confirmed, it will appear in the "transactions" block in your client interface. Clicking on it will open a new modal with the transaction's details
Decrypting a message
The message can be decrypted either using the sender or recipient's private key or the shared key provided with each arbitrary message transaction. For instance, using the user interface:
When providing the private key of the sender and clicking on the "Decrypt" button, the encrypted message and the shared key is shown:
The shared key is also a way to share the content of the message without revealing neither the sender nor the recipient's private keys. Hence, a third party can have access to the message. The message can be decrypted using this method using the UI or the API as the following picture shows: