One of the core objectives of the Horizen blockchain platform is to make online privacy accessible to as many people as possible. Because secure and private conversations are a huge part of this objective we have built ZenChat as our first application on the Horizen Blockchain Platform. ZenChat allows users to communicate 1-on-1 or through group messages and channels. You can choose to send messages from an identifiable address or completely anonymous.

The value of our messaging protocol doesn’t just rely on regular user communication, but also on the communication between different clients, nodes, and applications on the protocol level. This will allow for highly interoperable applications to be built on our platform.

How to Start?

If you would like to start using the ZenChat messenger the easiest way to do so is to download our Flagship App Sphere by Horizen and create a wallet. You must activate the full mode in the settings to use ZenChat. Once you have set up the wallet you need to create a messaging identity and choose a nickname. Users have to create and exchange a conversation key to start a conversation. This conversation key can be exchanged externally, e.g. through discord.

A user is free to include other information in their messaging identity as they see fit. Our desired long-term solution is a distributed registry of ZenChat identities on the Horizen blockchain!

Messaging Protocol

Messages in ZenChat are actually transactions on a blockchain, just like the ones you use to send funds. A special data field contains the actual message you are exchanging, the memo field, which is usually not occupied in a regular transaction. Users can send messages from T-Address to Z-Address if a user wishes to be identifiable or from one Z-Address to another if the user chooses to communicate anonymously.

The sender of a message must have two addresses:

  • a Z-Address to send and receive the messaging transaction (used for “transport” only)
  • a T-Address to sign the message being sent and for the use case when the user is not anonymous, prove the sender’s identity

Below you can see what an actual messaging transaction (“zenmsg”) actually looks like. It is comprised of a data field indicating the version (“ver”) of the protocol that the chat client runs, the address of the sender (“from”), the actual message and a signature (“sign”). With this messaging format, the effective maximum length of a user message (“message”) is approx. 340 characters. Future protocol versions may allow larger messages by sending one message split into multiple transactions. When a user sends a message, the T-Address signs the text message of the sender and includes the signature in the message. There is no need to include a recipient because the signature includes information on who can read the message.

{
   "zenmsg":
   { "ver": 1,
     "from": "znn9wRVAkgNnKCYJvsHu9nm4Q7c6AxLE2qR",
     "message": "Actual chat message is here etc. whatever", 
     "sign": "H5L3vhCQ+3EAz7BRrpNqy2x42VF+oY1WowGxCwEJkMlcbfX+GLU3PWOzPwJK+BUBY5YoDk/hAkF4GwtqyWWOngI="
   }
}

Don’t worry if this sounds overwhelming at first, the chat client you are using will take care of all the formalities. Once you have exchanged the conversation key with another user the interface will look like any other chat-app you are already familiar with.

Anonymous Messages

If you decide to send an anonymous message the message-transaction will look slightly different. The message won’t contain a sender of any kind. The thread ID replaces the sender and signature. The chat interface generates the thread ID and includes information about the sender and the direction of the message.

It is not possible for the recipient to reply to such a message, as he does not have any information about who to send the answer to.

{
   "zenmsg":
   { 
     "ver": 1,
     "message": "Actual chat message is here etc. whatever", 
     "threadid": "123e4567-e89b-12d3-a456-426655440000"
   }
}

Group Messages

Group messaging involves multiple users sending messages to a single channel/group. Messages are visible to all users involved. The channel has a dedicated Z-Address that all users send messages to. Messages may have identifiable senders or they may be anonymous. Users may send a special message to the channel containing their identity details if they wish to share these. If a user does not send such a special message other users will know their T-Address but will not necessarily know who is behind it.

The way to obtain a Z-Address for a messaging channel is implementation specific. One way recommended for user convenience is to let users use a common phrase, such as a #hashtag. Users individually convert this phrase into a Z-Address and import them into their wallet/GUI client.

Summary

A messaging feature is a valuable addition to the functionality stack of our blockchain platform. It not only allows users to communicate 1-on-1 or in groups/channels but also through different software clients, wallets and applications. Users can create as many messaging identities as they wish and can choose to communicate anonymously or openly. A message in the ZenChat application is a transaction with the message attached in an additional data field. Messages via our ZenChat application allow for about 340 characters.

While users have to exchange their messaging identities externally at the moment, it is the desired long term plan to have a distributed registry of messaging identities on the Horizen blockchain. In order to create a messaging channel, a common phrase or #hashtag can be converted into a Z-Address.

Why don’t you try the ZenChat messenger out for yourself? Download our flagship app Sphere by Horizen, activate the Full Mode in the Settings and send your first message. If you don’t own any ZEN yet, visit our Faucet where you will receive a small amount of free ZEN so you can start exploring our messenger application.