Home

Awesome

Virgil IoTKit

Documentation Doxygen GitHub license

<a href="https://developer.virgilsecurity.com/docs"><img width="230px" src="https://cdn.virgilsecurity.com/assets/images/github/logos/iotkit/IoTKit.png" align="left" hspace="1" vspace="3"></a>

Introduction

Virgil Security provides a set of APIs for adding security to any application or IoT device.

Virgil IoTKit is a C library for connecting IoT devices to the Virgil IoT Security Platform. IoTKit helps you easily add security to your IoT devices at any lifecycle stage for securely provisioning and authenticating devices, updating firmware and TrustLists, and exchanging messages using any transport protocols.

Content

<div id='features'/>

Features

Virgil IoTKit provides a set of features for IoT device security and management:

<div id='iot-dev-tools'/>

IoT Dev Tools

Virgil Security also provides a set of tools for secure device lifecycle:

<div id='run-iotkit-sandbox'/>

Run IoTKit Sandbox

To demonstrate our IoTKit in action we developed Sandbox based on IoTKit.

The Sandbox is conditionally divided into 3 actors (Vendor, Factory and End-user) and shows the secure lifecycle of IoT devices. The Sandbox allows you to:

<img width="100%" src="https://cdn.virgilsecurity.com/assets/images/github/web_demo/web_sandbox_demo.png?demo" align="left" hspace="0" vspace="6">

To start working with the Sandbox follow Sandbox README.

You can try to use Demo IoTKit Qt open project on your platform to test Qt integration usage. This software grants you modern GUI application able to be started on many desktop and mobile platforms like Linux, Windows, Android, iOS etc.

<div id='modules'/>

IoTKit Modules

As we mentioned above, Virgil IoTKit provides a set of features that implemented to modules:

<div id='scripts'/>

Scripts

Virgil IoTKit also contains a set of scripts that can be run from the scripts folder.

<div id='installation'/>

Installation

Virgil IoTKit is distributed as a package. This section demonstrates on how to install Virgil IoTKit for preferred platform.

<div id='prerequisites'/>

Prerequisites

To start working with Virgil IoTKit the following components are required:

Also Virgil IoTKit has C++/Qt integration based on Qt crossplatform library. Following components are required to use Qt integration:

<div id='ubuntu-debian-raspbian-os'/>

Ubuntu, Debian, Raspbian OS

To download and install the Virgil IoTKit on Ubuntu, use the following command:

$ sudo apt-get install make gcc cmake golang git libcurl4-openssl-dev doxygen swig

To add repository to preferred OS, use the following command:

Ubuntu 19.10 Suite (eoan)

echo "deb http://virgilsecurity.bintray.com/iot-deb/ Ubuntu_19  iot" >> /etc/apt/sources.list

Ubuntu 18.04 (bionic)

echo "deb http://virgilsecurity.bintray.com/iot-deb/ Ubuntu_18 iot" >> /etc/apt/sources.list

Raspbian 9 (stretch)

echo "deb http://virgilsecurity.bintray.com/iot-deb/ Raspbian_9 iot" >> /etc/apt/sources.list

Raspbian 10 (buster)

echo "deb http://virgilsecurity.bintray.com/iot-deb/ Raspbian_10 iot" >> /etc/apt/sources.list

Note! All DEB repositories are not signed, therefore to update lists for them use the following command: apt-get update --allow-insecure-repositories --allow-unauthenticated

<div id='fedora-os'/>

Fedora OS

To download and install the Virgil IoTKit on Fedora or CentOS, use the following command:

$ sudo yum install make cmake golang git gcc gcc-c++ libcurl-devel doxygen swig

To add repository to preferred OS use the following command:

Fedora 29

$ sudo yum install https://virgilsecurity.bintray.com/iot-rpm/Fedora/29/x86_64/virgil-bintray-release-0.1.0-1.1.noarch.rpm

Fedora 30

$ sudo yum install https://virgilsecurity.bintray.com/iot-rpm/Fedora/30/x86_64/virgil-bintray-release-0.1.0-1.1.noarch.rpm

Fedora 31

$ sudo yum install https://virgilsecurity.bintray.com/iot-rpm/Fedora/31/x86_64/virgil-bintray-release-0.1.0-1.1.noarch.rpm
<div id='macos'/>

MacOS

To download and install the Virgil IoTKit on MacOS, use the following command:

$ brew install make cmake golang git gcc curl doxygen swig
<div id='windows-os'/>

Windows OS

It is necessary to install software listed below :

Start MSYS2 and try to see all those software versions :

git --version
cmake --version
make --version
gcc --version

If some software has not been found, check PATH system variable.

After these steps you can clone Git repository and use build-for-qt.sh script.

<div id='qt-integration'/>

Ready Linux packets

IoTKit also contains ready-made (pre-compiled) packets for Linux OS, that can be installed using an OS package manager.

Qt integration

<div id='tests'/>

Tests

To make sure that everything goes in the right way, we also provide a set of ready code-snippets for testing all the required features:

Navigate to the tests folder of our IoTKit Demo repository to find preferred tests and start working with them.

You can try to use Demo IoTKit Qt open project to test Qt integration usage. To have full testing start any IoT devices in your network and observe its states by using demo-iotkit-qt software. You can use Sandbox as such devices set.

<div id='iotkit-usage'/>

IoTKit Usage

To start working with Virgil IoTKit you have to:

<div id='config-params'/>

Configuration parameters

Configuration headers directory

There are configuration headers that customize Virgil IoTKit, they are stored in config directory. You can provide your headers or use standard ones. It's necessary to add VIRGIL_IOT_CONFIG_DIRECTORY variable that points to the directory with configuration files.

For example, if you want to use PC configuration provided by library and library is stored in virgil-iotkit directory, you have to set compiler option: -DVIRGIL_IOT_CONFIG_DIRECTORY virgil-iotkit/config/pc.

MCU Build

The VIRGIL_IOT_MCU_BUILD variable enables or disables microcontroller features. If some microcontroller features are not compatible with your PC configuration or you don't need to use MCU features, you can disable them through the VIRGIL_IOT_MCU_BUILD variable during compilation: -DVIRGIL_IOT_MCU_BUILD=OFF.

Mobile platforms Build

Use integration/qt/iotkit.pri qmake script to include Virgil IoTKit Qt framework.

<div id='mandatory-implementations'/>

Mandatory implementations

Some IoTKit modules use external implementations, therefore it's necessary to implement HAL (hardware abstraction layer) functions:

<div id='default-mandatory-implementations'/>

Default Mandatory implementations

Virgil IoTKit also provides default mandatory implementations:

<div id='api-reference'/>

API Reference

<div id='license'/>

License

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

<div id='support'/>

Support

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

You can find us on Twitter or send us an email at support@VirgilSecurity.com.

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