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.
Virgil Security Crypto library wrapper is decomposed to small libraries with specific purposes, so a developer can freely choose a subset of them.
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|
|Message Authentication Code||HMAC|
|Digital Signature||Ed25519, RSASSA-PSS|
|Entropy Source||Linux, macOS /dev/urandom,
|Symmetric Algorithms||AES-256-GCM, AES-256-CBC|
|Elliptic Curves||Ed25519, Curve25519|
Implementation of the Pythia protocol.
Implementation of the Double Ratchet protocol.
VirgilCrypto is provided as a set of frameworks. These frameworks are distributed via Carthage and CocoaPods.
All frameworks are available for:
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 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
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.
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:
Check Embed & sign for each.
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:
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 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.
This library is released under the 3-clause BSD License.
Our developer support team is here to help you.
Also, get extra help from our support team on Slack.