All Projects → VirgilSecurity → Virgil Crypto Php

VirgilSecurity / Virgil Crypto Php

Licence: bsd-3-clause
Virgil PHP 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.

Projects that are alternatives of or similar to Virgil Crypto Php

virgil-sdk-cpp
Virgil Core SDK allows developers to get up and running with Virgil Cards Service API quickly and add end-to-end security to their new or existing digital solutions to become HIPAA and GDPR compliant and more.
Stars: ✭ 18 (-18.18%)
Mutual labels:  cryptography, encryption, gdpr, end-to-end-encryption
Demo Twilio Backend Nodejs
A sample backend that demonstrates how to generate a Virgil JWT and Twilio token used for authentication with the Virgil and Twilio services
Stars: ✭ 128 (+481.82%)
Mutual labels:  cryptography, encryption, crypto, end-to-end-encryption
Securitydriven.inferno
✅ .NET crypto done right. Professionally audited.
Stars: ✭ 501 (+2177.27%)
Mutual labels:  cryptography, encryption, crypto
Helib
HElib is an open-source software library that implements homomorphic encryption. It supports the BGV scheme with bootstrapping and the Approximate Number CKKS scheme. HElib also includes optimizations for efficient homomorphic evaluation, focusing on effective use of ciphertext packing techniques and on the Gentry-Halevi-Smart optimizations.
Stars: ✭ 2,749 (+12395.45%)
Mutual labels:  cryptography, encryption, crypto
Securefs
Filesystem in userspace (FUSE) with transparent authenticated encryption
Stars: ✭ 518 (+2254.55%)
Mutual labels:  cryptography, encryption, crypto
Gun
An open source cybersecurity protocol for syncing decentralized graph data.
Stars: ✭ 15,172 (+68863.64%)
Mutual labels:  cryptography, encryption, crypto
Nsec
A modern and easy-to-use cryptographic library for .NET Core based on libsodium
Stars: ✭ 217 (+886.36%)
Mutual labels:  cryptography, encryption, crypto
virgil-crypto
Virgil Crypto 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. Crypto Library is written in C++, suitable for mobile and server platforms and supports bindings with: Swift, Obj-C, Java (Android), С#/.NET, …
Stars: ✭ 74 (+236.36%)
Mutual labels:  crypto, gdpr, end-to-end-encryption
Cryptogotchas
A collection of common (interesting) cryptographic mistakes.
Stars: ✭ 118 (+436.36%)
Mutual labels:  cryptography, encryption, crypto
Awesome Cryptography
A curated list of cryptography resources and links.
Stars: ✭ 3,475 (+15695.45%)
Mutual labels:  cryptography, encryption, crypto
S2n Tls
s2n : an implementation of the TLS/SSL protocols
Stars: ✭ 4,029 (+18213.64%)
Mutual labels:  cryptography, encryption, crypto
Padding Oracle Attacker
🔓 CLI tool and library to execute padding oracle attacks easily, with support for concurrent network requests and an elegant UI.
Stars: ✭ 136 (+518.18%)
Mutual labels:  cryptography, encryption, crypto
Maskbook
The portal to the new, open internet. ([I:b])
Stars: ✭ 691 (+3040.91%)
Mutual labels:  cryptography, encryption, crypto
Capillary
Capillary is a library to simplify the sending of end-to-end encrypted push messages from Java-based application servers to Android clients.
Stars: ✭ 445 (+1922.73%)
Mutual labels:  cryptography, crypto, end-to-end-encryption
Noise
.NET Standard 1.3 implementation of the Noise Protocol Framework (revision 33 of the spec)
Stars: ✭ 124 (+463.64%)
Mutual labels:  cryptography, encryption, crypto
Awesome Virgil
Key Management and Crypto Building Block for your App or Device.
Stars: ✭ 146 (+563.64%)
Mutual labels:  gdpr, cryptography, end-to-end-encryption
Fhe Toolkit Linux
IBM Fully Homomorphic Encryption Toolkit For Linux. This toolkit is a Linux based Docker container that demonstrates computing on encrypted data without decrypting it! The toolkit ships with two demos including a fully encrypted Machine Learning inference with a Neural Network and a Privacy-Preserving key-value search.
Stars: ✭ 1,123 (+5004.55%)
Mutual labels:  cryptography, encryption, crypto
Cryfs
Cryptographic filesystem for the cloud
Stars: ✭ 1,560 (+6990.91%)
Mutual labels:  cryptography, encryption, crypto
virgil-sdk-net
Virgil Core SDK allows developers to get up and running with Virgil Cards Service API quickly and add end-to-end security to their new or existing digital solutions to become HIPAA and GDPR compliant and more.
Stars: ✭ 16 (-27.27%)
Mutual labels:  encryption, gdpr, end-to-end-encryption
Darkwire.io
End-to-end encrypted instant web chat
Stars: ✭ 594 (+2600%)
Mutual labels:  cryptography, encryption, end-to-end-encryption

Virgil Crypto Library PHP

Build Status GitHub license Latest Version on Packagist Total Downloads

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

Introduction

Virgil Crypto Library PHP 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.

Library purposes

  • Asymmetric Key Generation
  • Encryption/Decryption of data and streams
  • Generation/Verification of digital signatures
  • Double Ratchet algorithm support
  • Post-quantum algorithms support: Round5 (encryption) and Falcon (signature)
  • Crypto for using Virgil Core SDK

Installation

Requirements:

  • PHP 7.2 / 7.3 / 7.4

Installation via composer

composer require virgil/crypto

Usage examples

Generate a key pair

Generate a key pair using the default algorithm (EC_X25519):

$crypto = new VirgilCrypto();
$keyPair = $crypto->generateKeyPair();

Generate and verify a signature

Generate signature and sign data with a private key:

$crypto = new VirgilCrypto();
$senderKeyPair = $crypto->generateKeyPair();

// prepare a message
$messageToSign = "Hello, Bob!";

// generate a signature
$signature = $crypto->generateSignature($messageToSign, $senderKeyPair->getPrivateKey());

Verify a signature with a public key:

$crypto = new VirgilCrypto();
    
$senderKeyPair = $crypto->generateKeyPair();    
    
// prepare a message
$messageToSign = "Hello, Bob!";

// generate a signature
$signature = $crypto->generateSignature($messageToSign, $senderKeyPair->getPrivateKey());
    
// verify a signature
$verified = $crypto->verifySignature($signature, $messageToSign, $senderKeyPair->getPublicKey());

Encrypt and decrypt data

Encrypt data with a public key:

$crypto = new VirgilCrypto();
$receiverKeyPair = $crypto->generateKeyPair();

// prepare a message
$messageToEncrypt = "Hello, Bob!";

// encrypt the message
$encryptedData = $crypto->encrypt($messageToEncrypt, new VirgilPublicKeyCollection($receiverKeyPair->getPublicKey()));

Decrypt the encrypted data with a private key:

$crypto = new VirgilCrypto();
$receiverKeyPair = $crypto->generateKeyPair();

// prepare a message
$messageToEncrypt = "Hello, Bob!";

// encrypt the message
$encryptedData = $crypto->encrypt($messageToEncrypt, new VirgilPublicKeyCollection($receiverKeyPair->getPublicKey()));

// prepare data to be decrypted and decrypt the encrypted data using a private key
$decryptedData = $crypto->decrypt($encryptedData, $receiverKeyPair->getPrivateKey());

Import and export keys

Export keys:

use Virgil\CryptoImpl\VirgilCrypto;

$crypto = new VirgilCrypto();
$keyPair = $crypto->generateKeys();

// export private key
$privateKeyData = $crypto->exportPrivateKey($keyPair->getPrivateKey(), "YOUR_PASSWORD");
$privateKeyStr = base64_encode($privateKeyData);

// export public key
$publicKeyData = $crypto->exportPublicKey($keyPair->getPrivateKey());
$publicKeyStr = base64_encode($publicKeyData);

Import keys:

use Virgil\CryptoImpl\VirgilCrypto;

$crypto = new VirgilCrypto();
$privateKeyStr = "MIGhMF0GCSqGSIb3DQEFDTBQMC8GCSqGSIb3DQEFDDAiBBBtfBoM7VfmWPlvyHuGWvMSAgIZ6zAKBggqhkiG9w0CCjAdBglghkgBZQMEASoEECwaKJKWFNn3OMVoUXEcmqcEQMZ+WWkmPqzwzJXGFrgS/+bEbr2DvreVgEUiLKrggmXL9ZKugPKG0VhNY0omnCNXDzkXi5dCFp25RLqbbSYsCyw=";

$privateKeyData = base64_decode($privateKeyStr);

// import a Private key
$privateKey = $crypto->importPrivateKey($privateKeyData, "YOUR_PASSWORD");

//-----------------------------------------------------

$publicKeyStr = "MCowBQYDK2VwAyEA9IVUzsQENtRVzhzraTiEZZy7YLq5LDQOXGQG/q0t0kE=";

$publicKeyData = base64_decode($publicKeyStr);

// import a Public key
$publicKey = $crypto->importPublicKey($publicKeyData);

Additional information

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

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].