Latest 0.7.0
Homepage https://github.com/VirgilSecurity/virgil-cryptowrapper-x
License BSD
Platforms ios 9.0, osx 10.9, tvos 9.0, watchos 2.0
Dependencies VSCCrypto/Common, VSCCrypto/Foundation
Authors

Virgil Security Objective-C/Swift Crypto Library Wrapper

Build Status
CocoaPods Compatible
Carthage compatible
Platform
GitHub license

Introduction | Features | Installation | Docs | License | Contacts

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

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: 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.7.0'
  pod 'VirgilCryptoRatchet', '~> 0.7.0'
  pod 'VirgilCryptoPythia', '~> 0.7.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.7.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:

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

    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:

/usr/local/bin/carthage copy-frameworks

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:

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

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 [email protected]

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

Latest podspec

{
    "name": "VirgilCryptoFoundation",
    "version": "0.7.0",
    "swift_versions": "5.0",
    "license": {
        "type": "BSD",
        "file": "LICENSE"
    },
    "summary": "Contains basic swift classes for creating key pairs, encrypting/decrypting data, signing data and verifying signatures.",
    "homepage": "https://github.com/VirgilSecurity/virgil-cryptowrapper-x",
    "authors": {
        "Virgil Security": "https://virgilsecurity.com/"
    },
    "source": {
        "git": "https://github.com/VirgilSecurity/virgil-cryptowrapper-x.git",
        "tag": "0.7.0"
    },
    "platforms": {
        "ios": "9.0",
        "osx": "10.9",
        "tvos": "9.0",
        "watchos": "2.0"
    },
    "public_header_files": "VirgilCryptoFoundation/VirgilCryptoFoundation.h",
    "source_files": "VirgilCryptoFoundation/**/*.{h,mm,swift}",
    "dependencies": {
        "VSCCrypto/Common": [
            "= 0.7.0"
        ],
        "VSCCrypto/Foundation": [
            "= 0.7.0"
        ]
    }
}

Pin It on Pinterest

Share This