IntroductionIn this tutorial, we help you to add end-to-end encryption (E2EE) in your digital solutions like: Messenger App, ChatBot, IoT devices in order to communicate securely.Prerequisites and additional infoWhat is E2EE used for:encrypt and sign messages to be transmittedidentify the sender/receiverdecrypt the message and verify its signature to prove that the message has not been tampered with.E2EE chat prerequisitesE2EE chat consists of the following parts:Front-end (client side) - it can be any mobile/desktop/web application that will be used by your clients.Back-end (server side) - this is your application server or any back-end platform (Back4App, Twilio, Firebase, etc.) that you use to approve/authenticate your clients (users) and transfer messages.Crypto Library - a library which performs all the necessary cryptographic operations (private keys generation, encryption, decryption, etc.).Public Keys service - a service that stores your users' public keys which are used for public key management (publishing, finding, deactivating user's public key).What Virgil provides for developersOpen source Crypto Library. Used to perform cryptographic operations.Virgil Cards Service. For storing and managing users' Public Keys and for the validation of user identities in anything from emails to applications. Virgil SDK. Allows you to easily manage a Crypto Library and communicate with Virgil Services.What's needed from developer's sideBackend server for your application (it can be Twilio, Firebase, Back4App, your own backend)Client-side application. The same - you can use your own client part or use ready-build solutions.6 steps to become E2EE:1. Collect account informationRegister your Virgil AccountCreate your application on Virgil Developer DashboardCreate your API KeyCollect account information2. Install and setup Virgil SDKInstall and setup Virgil SDK on Server sideInstall and setup Virgil SDK on Client side3. Register usersClient: Generate user's private keyClient: Save key into local storageClient: Create user's Virgil CardClient: Publish user's Virgil Card to Virgil Cards Service4. Sign & encrypt a messageSender: Load the Private Key from device storageSender: Search for receiver's Virgil CardSender: Sign and encrypt the message5. Transmit the messageServer: Transmit the message (Application server uses any suitable way to transmit the message)6. Decrypt a message & verify its signatureReceiver: Load the Private Key from device storageReceiver: Get Sender's Virgil CardReceiver: Decrypt the message and verify its signatureIf you can't wait to see the result, take a look at the full code, which you can copy and test right away:See full codeYou can find the example at our demo apps for: Firebase and Twilio. They have full code for Client side, which demonstrates how the end-to-end encryption works, and use Firebase and Twilio backend respectively.Let's get started!