



On September 12th, 2019 the Copper v3.6.0 release is coming to Bytecoin. This release will bring an unconventional feature to the blockchain - messaging functionality. In this article we will describe the design of the system, the various aspects of it that make the technology secure, and share some insights into how the feature will look from a user’s perspective.

Before getting into the specifics regarding our messaging solution, we will first mention how secure messaging technology typically works and why it works well with blockchain technology. In a large variety of cases, messaging solutions rely on public-key cryptography to establish a secure communication channel between the two people. In such cases:





one user encrypts the message with the public key of the receiving party (that everyone has access to; this key cannot be used to decrypt the message back)

the receiving party decrypts the message with their private key (that only they posses, this key allows them to decrypt the messages)





With some other cases, symmetric cryptography is used: in this kind of cryptosystem a message is both encrypted and decrypted with the same key. In order to securely distribute this key between the communicating parties a key exchange system is employed. Probably one of the most prominent key exchange systems used these days is the Diffie-Hellman key exchange algorithm. To people not intimately familiar with cryptography this algorithm looks like a modern miracle: two parties generate a common secret in plain sight without actually sending over that secret.

Bytecoin elegantly employs a similar messaging solution. Each Bytecoin TX contains a field called extra that is used for miscellaneous service information. A message or a group of such messages is embedded into that field and, consequently, into the mined block.

Security-wise, a combination of the ChaCha cipher and modified version of the Diffie-Helman key exchange algorithm is used to keep the messages secret and available only to the sending and receiving parties. Our solution seals the message contents while keeping the sender and the receiver completely secure.

In order to send a message, a user has to embeds their message (or messages) in a TX and send it like a regular transaction. When the receiving side syncs the blockchain, the Bytecoin software determines which messages belong to the recipient and decrypts them.

Hence the Bytecoin software will be able to serve as a completely distributed peer-to-peer secure messaging tool. Users can try out the messaging functionality on September 12th, 2019.



