VirgilSecurity / virgil-sdk-crypto-net

Virgil .NET/C# Crypto Library is a high-level cryptographic library that allows you to perform all necessary operations for secure storing and transferring data and everything required to become HIPAA and GDPR compliant.

Home Page:https://developer.virgilsecurity.com/docs/how-to#cryptography

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Virgil Security .NET/C# Crypto Library

Build status Nuget package GitHub license

Introduction | Library purposes | Usage examples | Installation | Docs | License | Contacts

Introduction

VirgilCrypto is a stack of security libraries (ECIES with Crypto Agility wrapped in Virgil Cryptogram) and an open-source high-level cryptographic library that allows you to perform all necessary operations for securely storing and transferring data in your digital solutions. Crypto Library is written in C++ and is suitable for mobile and server platforms.

Virgil Security, Inc., guides software developers into the forthcoming security world in which everything will be encrypted (and passwords will be eliminated). In this world, the days of developers having to raise millions of dollars to build a secure chat, secure email, secure file-sharing, or a secure anything have come to an end. Now developers can instead focus on building features that give them a competitive market advantage while end-users can enjoy the privacy and security they increasingly demand.

Library purposes

  • Asymmetric Key Generation
  • Encryption/Decryption of data and streams
  • Generation/Verification of digital signatures
  • PFS (Perfect Forward Secrecy)

Usage examples

Generate a key pair

Generate a Private Key with the default algorithm (EC_X25519):

using Virgil.Crypto;

var crypto = new VirgilCrypto();
var keyPair = crypto.GenerateKeys();

Generate and verify a signature

Generate signature and sign data with a private key:

using Virgil.Crypto;

var crypto = new VirgilCrypto();

// prepare a message
var messageToSign = "Hello, Bob!";
var dataToSign = Encoding.UTF8.GetBytes(messageToSign);

// generate a signature
var signature = crypto.GenerateSignature(dataToSign, senderPrivateKey);

Verify a signature with a public key:

using Virgil.Crypto;

var crypto = new VirgilCrypto();

// verify a signature
var verified = crypto.VerifySignature(signature, dataToSign, senderPublicKey);

Encrypt and decrypt data

Encrypt Data on a Public Key:

using Virgil.Crypto;

var crypto = new VirgilCrypto();

// prepare a message
var messageToEncrypt = "Hello, Bob!";
var dataToEncrypt = Encoding.UTF8.GetBytes(messageToEncrypt);

// encrypt the message
var encryptedData = crypto.Encrypt(dataToEncrypt, receiverPublicKey);

Decrypt the encrypted data with a Private Key:

using Virgil.Crypto;

var crypto = new VirgilCrypto();

// prepare data to be decrypted
var decryptedData = crypto.Decrypt(encryptedData, receiverPrivateKey);

// decrypt the encrypted data using a private key
var decryptedMessage = Encoding.UTF8.GetString(decryptedData);

Need more examples? Visit our developer documentation.

Installation

The Virgil .NET Crypto is provided as a package named Virgil.SDK.Crypto. The package is distributed via NuGet package management system.

Supported Platforms:

  • .NET Standard 1.1+
  • .NET Framework 4.5+
  • .NET Core 1.0+
  • Universal Windows Platform 10
  • Windows 8.0+
  • Windows Phone 8.1+
  • Xamarin.Android 7.0+
  • Xamarin.iOS 10.0+
  • Mono 4.6+ for x86-64(AMD64)

Installing the package using Package Manager Console:

Run PM> Install-Package Virgil.Crypto

Docs

License

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

Support

Our developer support team is here to help you. Find out more information on our Help Center.

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 .NET/C# Crypto Library is a high-level cryptographic library that allows you to perform all necessary operations for secure storing and transferring data and everything required to become HIPAA and GDPR compliant.

https://developer.virgilsecurity.com/docs/how-to#cryptography


Languages

Language:C# 96.0%Language:Shell 4.0%