Virgil Security Objective-C/Swift Crypto Library Wrapper
Introduction | Features | Installation | Docs | License | Contacts
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|
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.
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:
- iOS 9.0+
- macOS 10.9+
- tvOS 9.0+
- watchOS 2.0+
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.12.0' pod 'VirgilCryptoRatchet', '~> 0.12.0' pod 'VirgilCryptoPythia', '~> 0.12.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.12.0
Linking against prebuilt binaries
To link prebuilt frameworks to your app, run following command:
$ carthage update
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:
NOTE: It's not mandatory to include all this dependencies, add only frameworks you are going to use. Frameworks with VSC prefix in their name are written in C, those without prefix are swift frameworks. It is mandatory to include VSCCommon and for any VirgilCryptoNAME.framework add also VSCNAME.framework.
On your application target's “Build Phases” settings tab, click the “+” icon and choose “New Run Script Phase”. Create a Run Script in which you specify your shell (ex: /bin/sh), add the following contents to the script area below the shell:
and add the paths to the frameworks you want to use under “Input Files”, e.g.:
$(SRCROOT)/Carthage/Build/iOS/VirgilCryptoFoundation.framework $(SRCROOT)/Carthage/Build/iOS/VirgilCryptoRatchet.framework $(SRCROOT)/Carthage/Build/iOS/VirgilCryptoPythia.framework $(SRCROOT)/Carthage/Build/iOS/VSCCommon.framework $(SRCROOT)/Carthage/Build/iOS/VSCFoundation.framework $(SRCROOT)/Carthage/Build/iOS/VSCRatchet.framework $(SRCROOT)/Carthage/Build/iOS/VSCPythia.framework
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:
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.
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.