Skip to content
E3Kit is an SDK that simplifies work with Virgil services and presents the easiest way to add full end-to-end (E2EE) security to their applications to become HIPAA and GDPR compliant and more.
Branch: master
Clone or download
xlwknx Merge pull request #23 from VirgilSecurity/cardoso-patch-1
Change to dev docs use cases
Latest commit 3b40474 Mar 20, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
config add apiUrl to EThree constructor and initialize method Feb 22, 2019
example migrate from jest to karma+mocha+expect from jest Jan 29, 2019
src review fix Mar 19, 2019
.env.example fix encrypting for own key Dec 22, 2018
.gitignore add EThree comments Mar 18, 2019
.travis.yml update travis to run before deploy Mar 19, 2019 fix mistake Feb 21, 2019
LICENSE Initial commit Oct 17, 2018 Merge branch 'master' into cardoso-patch-1 Mar 20, 2019
karma.conf.js add apiUrl to EThree constructor and initialize method Feb 22, 2019
package-lock.json add EThree comments Mar 18, 2019
package.json add EThree comments Mar 18, 2019
tsconfig.json error comments Mar 18, 2019
tslint.json init Oct 17, 2018

Virgil E3Kit Typescript/Javascript SDK

Build Status npm GitHub license

Introduction | SDK Features | Installation | Usage Example | Docs | Support


Virgil Security provides an SDK which simplifies work with Virgil services and presents easy to use API for adding security to any application. In a few simple steps you can setup user encryption with multidevice support.

SDK Features

  • multidevice support
  • manage users' Public Keys


You can install this module from npm. Another option is to add it via script tag in browser.


You will need to install @virgilsecurity/e3kit.

npm install @virgilsecurity/e3kit

In browser via script tag

You will need to add @virgilsecurity/e3kit script.

<script src=""></script>

Usage Example

Initialize & Register

import { EThree } from '@virgilsecurity/e3kit-js'
// get virgil token from you backend (better to protect it!)
const getToken = () => fetch('http://localhost:3000/get-virgil-jwt/')
    .then(res => res.json())
    .then(data =>  data.token);

// get your unique identity from backend
const sdk = await EThree.initialize(getToken);
// create private key and upload it to our protected cloud service
await sdk.register();
await sdk.backupPrivateKey('encryption_pwd');

Encrypt & Decrypt

const usersToEncryptTo = ["", "", ''];
const userThatEncrypts = "";
const [receiverPublicKeys, senderPublicKey] = await Promise.all([

const encryptedMsg = await eThree.encrypt('Send you my sensitive information!', receiversPublicKeys);
const decryptedMsg = await eThree.decrypt(encryptedMsg, senderPublicKey);
// we decrypt the message and check that it is sent by ""

You can find more examples in examples folder and on

React Native usage

This package works with

import { EThree } from '@virgilsecurity/e3kit';
import createNativeKeyEntryStorage from '@virgilsecurity/key-storage-rn/native';
// or
import createExpoKeyEntryStorage from '@virgilsecurity/key-storage-rn/expo';

const keyEntryStorage = createNativeKeyEntryStorage();
// or
const keyEntryStorage = createExpoKeyEntryStorage();

EThree.initialize(getTokenCallback, { keyEntryStorage });


Virgil Security has a powerful set of APIs, and the documentation below can get you started today.


This library is released under the 3-clause BSD License.


Our developer support team is here to help you. Find out more information on our Help Center.

You can find us on Twitter or send us email

Also, get extra help from our support team on Slack.

You can’t perform that action at this time.