Skip to content

Virgil Crypto library is a small, flexible and convenient wrapper for a variety of cryptographic algorithms. Includes asymmetric key generation, encryption/decryption of data, generation/verification of digital signatures, Pythia protocol and Double Ratchet protocol implementation.

License

Notifications You must be signed in to change notification settings

VirgilSecurity/virgil-cryptowrapper-x

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Virgil Security Objective-C/Swift Crypto Library Wrapper

Build Status CocoaPods Compatible Carthage compatible Swift Package Manager Platform GitHub license

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 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.

Virgil Security Objective-C/Swift Crypto Library Wrapper is a wrapper for Virgil Security Crypto Library.

Features

Virgil Security Crypto library wrapper 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, PBKDF2
Key Exchange X25519, RSA
Hashing SHA-2 (224/256/384/512)
Message Authentication Code HMAC
Digital Signature Ed25519, RSASSA-PSS
Entropy Source Linux, macOS /dev/urandom,
Windows CryptGenRandom()
Symmetric Algorithms AES-256-GCM, AES-256-CBC
Encryption schemes PBES2
Elliptic Curves Ed25519, Curve25519

Library: Pythia

Implementation of the Pythia protocol.

Library: Ratchet

Implementation of the Double Ratchet protocol.

Installation

VirgilCrypto is provided as a set of frameworks. These frameworks are distributed via Carthage and CocoaPods.

All frameworks are available for:

  • iOS 9.0+
  • macOS 10.9+
  • tvOS 9.0+
  • watchOS 2.0+

COCOAPODS

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate VirgilCryptoWrapper into your Xcode project using CocoaPods, specify it in your Podfile:

target '<Your Target Name>' do
  use_frameworks!

  pod 'VirgilCryptoFoundation', '~> 0.16.0'
  pod 'VirgilCryptoRatchet', '~> 0.16.0'
  pod 'VirgilCryptoPythia', '~> 0.16.0'
end

NOTE: It's not mandatory to include all this dependencies, add only frameworks you are going to use.

Then, run the following command:

$ pod install

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate VirgilCryptoWrapper into your Xcode project using Carthage, create an empty file with name Cartfile in your project's root folder and add following lines to your Cartfile

github "VirgilSecurity/virgil-cryptowrapper-x" ~> 0.16.0

Linking against prebuilt binaries

To link prebuilt frameworks to your app, run following command:

$ carthage update --use-xcframeworks

This will build each dependency or download a pre-compiled framework from github Releases.

Building for iOS/tvOS/watchOS

On your application target's “General” settings tab, in the “Linked Frameworks and Libraries” section, add following frameworks from the Carthage/Build folder inside your project's folder:

  • VirgilCryptoFoundation
  • VirgilCryptoRatchet
  • VirgilCryptoPythia
  • VSCCommon
  • VSCFoundation
  • VSCRatchet
  • VSCPythia

Check Embed & sign for each.

Building for macOS

On your application target's “General” settings tab, in the “Embedded Binaries” section, drag and drop following frameworks from the Carthage/Build folder on disk:

  • VirgilCryptoFoundation
  • VirgilCryptoRatchet
  • VirgilCryptoPythia
  • VSCCommon
  • VSCFoundation
  • VSCRatchet
  • VSCPythia

Additionally, you'll need to copy debug symbols for debugging and crash reporting on macOS.

On your application target’s “Build Phases” settings tab, click the “+” icon and choose “New Copy Files Phase”. Click the “Destination” drop-down menu and select “Products Directory”. For each framework, drag and drop the corresponding dSYM file.

Swift Package Manager

Swift Package Manager is an official Apple tool for managing the distribution of Swift code.

The Apple documentation can be used to add frameworks to an Xcode project.

Docs

License

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

Support

Our developer support team is here to help you.

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

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

About

Virgil Crypto library is a small, flexible and convenient wrapper for a variety of cryptographic algorithms. Includes asymmetric key generation, encryption/decryption of data, generation/verification of digital signatures, Pythia protocol and Double Ratchet protocol implementation.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages