Skip to content
KeyKnox SDK allows developers to communicate with the Virgil Keyknox Service to upload, download, and synchronize encrypted sensitive data (private keys) between user's devices.
Branch: master
Clone or download
Latest commit 371dbeb Mar 1, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
gradle/wrapper copyright update to 2019 Feb 27, 2019
src custom product and version for HttpClient Feb 27, 2019
.gitignore Add license Aug 7, 2018 Merge pull request #2 from MariiaMalitska/patch-2 Feb 27, 2019
build.gradle VersionVirgilAgent package update Feb 27, 2019
gradlew Implement Keyknox SDK for Kotlin Aug 6, 2018
gradlew.bat Implement Keyknox SDK for Kotlin Aug 6, 2018

Virgil KeyKnox Java/Android SDK

Introduction | SDK Features | Install and configure SDK | Docs | Support


Virgil Security provides an SDK which allows you to communicate with Virgil Keyknox Service. Virgil Keyknox Service allows users to store their sensitive data (such as Private Key) encrypted (with end-to-end encryption) for using and sharing it between different devices.

SDK Features

  • use Virgil Crypto library
  • use Virgil SDK
  • upload encrypted sensitive data to Virgil Keyknox Service
  • download the data from Virgil Keyknox Service
  • update and synchronize the data

Install and configure SDK


Virgil Keyknox SDK is provided as a set of frameworks. These frameworks are distributed via Gradle and Maven. Also in this guide, you find one more package called VirgilCrypto (Virgil Crypto Library) that is used by the SDK to perform cryptographic operations.

TheVirgil Keyknox SDK is provided as a package named com.virgilsecurity.keyknox. The package is distributed via Maven repository.

The package is available for:

  • Java 8 and newer
  • Android API 16 and newer


  • Java Development Kit (JDK) 8+
  • Gradle 4+

You can easily add SDK dependency to your project, just follow the examples below.

Install SDK Package


Apache Maven is a software project management and comprehension tool.

To integrate Virgil Keyknox SDK into your Java project using Maven, set up dependencies in your pom.xml:



Gradle is an open-source build automation system that builds upon the concepts of Apache Ant and Apache Maven and introduces a Groovy-based domain-specific language (DSL) instead of the XML form used by Apache Maven for declaring the project configuration.


To integrate Virgil Keyknox SDK into your Java project using Gradle, set up dependencies in your build.gradle:

dependencies {
    compile 'com.virgilsecurity:keyknox:0.1.0'

To integrate Virgil Keyknox SDK into your Android project using Gradle, add jcenter() repository if missing:

repositories {

Set up dependencies in your build.gradle:

dependencies {
    implementation 'com.virgilsecurity.sdk:crypto-android:5.0.4@aar'
    implementation ('com.virgilsecurity:keyknox:0.1.0') {
        exclude group: 'com.virgilsecurity.sdk', module: 'crypto'

Configure SDK

To begin using Virgil Keyknox SDK you'll need to initialize SyncKeyStorage class. This class is responsible for synchronization between Keychain and Keyknox Cloud. In order to initialize SyncKeyStorage class you'll need the following values:

  • accessTokenProvider
  • public keys of all devices/users that should have access to data
  • private key of current device/user
  • identity of the user (the device can have different users)
// Setup Access Token provider to provide access token for Virgil services
// Check
val accessTokenProvider = ...

// Download public keys of users that should have access to data from Virgil Cards service
// Check
val publicKeys = ...

// Load private key from Keychain
val privateKey = ..

val syncKeyStorage = SyncKeyStorage(identity = "Alice", accessTokenProvider = accessTokenProvider,
        publicKeys = publicKeys, privateKey = privateKey)


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.