Skip to content

This library is designed to be small, flexible and convenient wrapper for a variety crypto algorithms. So it can be used in a small micro controller as well as in a high load server application.

License

Notifications You must be signed in to change notification settings

VirgilSecurity/virgil-crypto-c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License

Virgil Security Crypto Library for C

Build Linux Build macOS VirgilCrypto Swift Package Manager

Introduction

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 several custom hybrid algorithms that combine different crypto algorithms to solve common complex cryptographic problems in an easy way. This eliminates the requirement for developers to have strong cryptographic skills.

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

Features

The Virgil Security Crypto C library is decomposed into small libraries with specific purposes. A developer can freely choose a subset of libraries.

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, PBKDF2
Key Exchange X25519, RSA, ECDH
Key Encapsulation Mechanism Round5, ECIES-KEM
Hashing SHA-2 (224/256/384/512)
Message Authentication Code HMAC
Digital Signature Ed25519, RSASSA-PSS, ECDSA, Falcon
Entropy Source Linux, macOS /dev/urandom,
Windows CryptGenRandom()
Symmetric Algorithms AES-256-GCM, AES-256-CBC
Encryption schemes PBES2
Elliptic Curves Ed25519, Curve25519, secp256R1
Post-quantum cryptography Falcon, Round5

Library: PHE

The cryptographic background for the Password-Hardened Encryption (PHE) protocol that provides developers the technology to protect user passwords from offline attacks and render stolen passwords useless even if your database has been compromised. The service implementation can be found here.

Library: Pythia

The cryptographic background for the Pythia PRF Service.

Library: Ratchet

Implementation of the Double Ratchet Algorithm.

Platforms & languages

Library Platforms Languages / Binaries
foundation all C, Swift, Java, JS, Python, Go, PHP
pythia linux, macOS C, Swift, Java, JS, Python, PHP
phe all C, PHP, Java, JS, Python, Go, PHP
ratchet all C, Swift, Java, JS, Python, Go

Build from sources

Prerequisites

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

Build & Install

git clone https://github.com/VirgilSecurity/virgil-crypto-c.git
cd virgil-crypto-c
cmake -Bbuild -H.
cmake --build build
cmake --build build --target install

Run Benchmarks

cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_BENCHMARKING=ON \
      -DED25519_AMD64_RADIX_64_24K=ON -DED25519_REF10=OFF \
      -Bbuild -H.

cmake --build build -- -j10

./build/benchmarks/foundation/bench

Support

Our developer support team is here to help you.

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

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

License

BSD 3-Clause. See LICENSE for details.

About

This library is designed to be small, flexible and convenient wrapper for a variety crypto algorithms. So it can be used in a small micro controller as well as in a high load server application.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published