About Encrypted Direct Messages

 

How does it work?

The latest version of X includes a beta of the new Direct Messaging feature (“Chat”). When entering Chat for the first time, a private-public key pair is created specific to each user. Users are prompted to enter a PIN (which never leaves the device), which is used to keep the private key securely stored on X’s infrastructure. This private key can then be recovered from any device if the user knows that PIN. In addition to the private-public key pairs, there is a per-conversation key that is used to encrypt the content of the messages. The private-public key pairs are used to exchange the conversation key securely between participating users.

We employ a combination of strong cryptographic schemes to encrypt every single message, link, and reaction that are part of an encrypted conversation before they leave the sender’s device and remain encrypted while stored on X’s infrastructure. Once messages are received by the recipient devices, they are decrypted so that they can be read by the user.

We aim to open source our implementation and describe the encryption technology in depth through a technical whitepaper later this year.

 

Who is eligible to send and receive Encrypted Direct Messages?

Users need to satisfy the following conditions in order to send and receive Encrypted Direct Messages:

  • Both sender and recipient are on the latest X iOS or Android apps (Web to follow); and

  • Recipient follows or subscribes to the sender, has sent a message to sender previously, or has accepted a Direct Message from the sender before.

 

How to send an Encrypted Direct Message?

To send an Encrypted Direct Message, enter Chat from the dash menu (left sidebar). Tap the compose message button and search for a recipient. Compose a message and click send.

 

Registration / Unregistration

Users can register for Encrypted Direct Messages by entering the Chat tab from the dash menu and inputting a PIN. This will initiate the creation of a public-private key pair which can then be retrieved from any device. To remove your private key from a device, log out of the account.

 

Limitations

We welcome feedback and are actively working on improving every aspect of the product, from user experience to protocol security.

Unlike before, group messages and media can now be encrypted.

 

Content

The contents of an Encrypted Direct Message are always encrypted, including any links, media, or files. Reactions to Encrypted Direct Messages are also encrypted. It is important to note that while the message content itself is encrypted, associated metadata (e.g., recipient, creation time, etc.) is not. If Posts are shared in an encrypted chat, X will have a record that those Posts were shared.

 

New devices

There is no limit to the number of devices that can use Chat on X.

 

Verify integrity of conversations

Currently, we do not offer protections against man-in-the-middle attacks. As a result, if someone—a malicious insider or X itself as a result of a compulsory legal process—were to compromise an encrypted conversation, neither the sender or receiver would know. We are, however, working on mechanisms for a future release that will:

  • allow devices to verify the authenticity of the content and origin of a message (via “signature checks”); and

  • allow a pair of users to verify the devices that have access to their encrypted conversations (via “safety numbers”).

When signature checks and safety numbers are implemented, man-in-the-middle attacks should be difficult, if not impossible, and both senders and recipients should be alerted in the event of an attack.

 

Reporting

Currently, it is not possible to report an Encrypted Direct Message to X due to the encrypted nature of the conversation. If you encounter an issue with an encrypted conversation participant, we suggest you file a report about the account itself and our team will take a look. 

To prevent someone from sending you Encrypted Direct Messages, do not follow them or, if you already have had a Direct Message conversation with that user, block them.

 

Logout and key backup

If at any time you log out from X, all messages including Encrypted Direct Messages on your current device will be deleted; this will not impact any other devices on which you are logged in.

Upon logging out, X will erase any private keys and conversation keys. If you log back in on the same device, your device will be able to re-fetch and decrypt the encrypted conversations using the private key that the device had access to before logging out.

If you cannot remember the passcode you can reset it from any device which you are already using Chat from. If this is not possible, you will not be able to recover your encrypted conversation history. We will be improving this limitation in the near future.

 

Forward secrecy 

If the private key of a registered device is compromised, an attacker would be able to decrypt all Encrypted Direct Messages that were sent and received by that device. In other words, this implementation is not “forward secure.” We are working on mechanisms to allow private key rotation to offer some forward security in the future.

 

Encrypted Direct Message deletion

A new feature of Chat is that users are able to “unsend” a message, which will remove it from the recipient’s inbox.  Deleting or leaving an encrypted conversation will not prevent the other person from sending you a Direct Message (encrypted or not) in the future.

When you delete an Encrypted Direct Message or conversation (sent or received), the data will be instantly deleted from your device (and soon after, from all your other devices). You will no longer be able to view it. Note that the recipient may still be able to see the Encrypted Direct Message or conversation you have deleted.

 

 

Disappearing Encrypted Direct Messages

Chat offers a new feature called Disappearing messages, which allows a user to select a duration, after which messages will be deleted from the device and X’s servers. To set the duration, navigate to the conversation info screen and tap the “Disappearing messages” menu.

 

Questions?

Post us @XEng!

Share this article