Latest 0.2.0-alpha3
License BSD
Platforms ios 9.0, osx 10.10, tvos 9.0, watchos 2.0
Dependencies VirgilCryptoCommon, VirgilCryptoFoundation, VSCCrypto/Common, VSCCrypto/Foundation, VSCCrypto/Ratchet


Virgil Security Crypto Library for C

branch build
master Build Status
develop Build Status


This library is designed to be a small, flexible and convenient wrapper for a variety of crypto algorithms.
So it can be used in a small microcontroller as well as in a high load server application. Also, it provides a bunch of custom hybrid algorithms that combine different crypto algorithms to solve common complex cryptographic problems in an easy way. That eliminates requirement for developers to have a strong cryptographic skills.

The library is available for different platforms and contains wrappers for other languages.


Virgil Security Crypto C library is decomposed to small libraries with specific purposes, so a developer can freely choose a subset of them.

Library: Foundation

This library contains basic cryptographic algorithms and can be used as building blocks for complex solutions.

Algorithm Purpose Implementation details
Key Generation, PRNG CTR_DRBG NIST SP 800-90A
Key Derivation KDF1, KDF2, HKDF
Key Exchange X25519, RSA
Hashing SHA-2 (224/256/384/512)
Digital Signature Ed25519, RSASSA-PSS
Entropy Source Linux, macOS /dev/urandom,
Windows CryptGenRandom()
Symmetric Algorithms AES-256-GCM
Elliptic Curves Ed25519

Library: PHE

Cryptographic background for the Password-Hardened Encryption (PHE) protocol that provides developers with a technology to protect users passwords from offline attacks and make stolen passwords useless even if your database has been compromised. Service implementation can be found here.

Library: Pythia

Cryptographic background for the Pythia PRF Service.

Platforms & languages

Library Platforms Languages / Binaries
foundation all C
pythia linux, macOS C
phe all C, PHP

Build from sources


  • Compiler:
    • gcc (version >= 4.8.2), or
    • clang (version >= 3.6), or
    • msvc (version >= 14.0)
  • Build tools:
    • cmake (version >= 3.11)
    • python (version >= 2.7)
    • python-protobuf

Build & Install

git clone
cd virgil-crypto-c
cmake -Bbuild -H.
cmake --build build
cmake --build build --target install


Our developer support team is here to help you.

You can find us on Twitter or send us email [email protected]

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


BSD 3-Clause. See LICENSE for details.

Latest podspec

    "name": "VirgilCryptoRatchet",
    "version": "0.2.0-alpha3",
    "license": {
        "type": "BSD",
        "file": "LICENSE"
    "summary": "Contains basic classes for creating key pairs, encrypting/decrypting data, signing data and verifying signatures.",
    "homepage": "",
    "authors": {
        "Virgil Security": ""
    "source": {
        "git": "",
        "tag": "0.2.0-alpha3"
    "platforms": {
        "ios": "9.0",
        "osx": "10.10",
        "tvos": "9.0",
        "watchos": "2.0"
    "public_header_files": "VirgilCryptoRatchet/VirgilCryptoRatchet.h",
    "source_files": "VirgilCryptoRatchet/**/*.{h,mm,swift}",
    "dependencies": {
        "VirgilCryptoCommon": [
            "= 0.2.0-alpha3"
        "VirgilCryptoFoundation": [
            "= 0.2.0-alpha3"
        "VSCCrypto/Common": [
            "= 0.2.0-alpha2"
        "VSCCrypto/Foundation": [
            "= 0.2.0-alpha2"
        "VSCCrypto/Ratchet": [
            "= 0.2.0-alpha2"

Pin It on Pinterest

Share This