All Projects → ioleo → Cryptomute

ioleo / Cryptomute

Licence: mit
Encrypt numeric data (binary, decimal, hex) preserving it's format (eg. 16-digits card number to 16-digits encrypted number).

Projects that are alternatives of or similar to Cryptomute

Opmsg
opmsg message encryption
Stars: ✭ 704 (+2833.33%)
Mutual labels:  encryption
Server
The Etebase server (so you can run your own)
Stars: ✭ 826 (+3341.67%)
Mutual labels:  encryption
Lyra
A lightweight encryption tool designed for ease of use.
Stars: ✭ 22 (-8.33%)
Mutual labels:  encryption
Duplicati
Store securely encrypted backups in the cloud!
Stars: ✭ 6,915 (+28712.5%)
Mutual labels:  encryption
Sdk Js
Tanker client-side encryption SDK for JavaScript
Stars: ✭ 786 (+3175%)
Mutual labels:  encryption
Notlitecode
Remote Encrypted Procedure Calling for .Net & .Net Core
Stars: ✭ 16 (-33.33%)
Mutual labels:  encryption
Rclone
"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Yandex Files
Stars: ✭ 30,541 (+127154.17%)
Mutual labels:  encryption
Ylva
Command line password manager for Unix-like operating systems
Stars: ✭ 23 (-4.17%)
Mutual labels:  encryption
Rage
A simple, secure and modern encryption tool (and Rust library) with small explicit keys, no config options, and UNIX-style composability.
Stars: ✭ 826 (+3341.67%)
Mutual labels:  encryption
Peergos
A p2p, secure file storage, social network and application protocol
Stars: ✭ 895 (+3629.17%)
Mutual labels:  encryption
Acra
Database security suite. Database proxy with field-level encryption, search through encrypted data, SQL injections prevention, intrusion detection, honeypots. Supports client-side and proxy-side ("transparent") encryption. SQL, NoSQL.
Stars: ✭ 726 (+2925%)
Mutual labels:  encryption
Minizip Ng
Fork of the popular zip manipulation library found in the zlib distribution.
Stars: ✭ 750 (+3025%)
Mutual labels:  encryption
Node Fpe
Format preserving string substitution encryption
Stars: ✭ 17 (-29.17%)
Mutual labels:  encryption
Cowyo
A feature-rich wiki webserver for minimalists 🐮 💬
Stars: ✭ 711 (+2862.5%)
Mutual labels:  encryption
Itext7
iText 7 for Java represents the next level of SDKs for developers that want to take advantage of the benefits PDF can bring. Equipped with a better document engine, high and low-level programming capabilities and the ability to create, edit and enhance PDF documents, iText 7 can be a boon to nearly every workflow.
Stars: ✭ 913 (+3704.17%)
Mutual labels:  encryption
Itext7 Dotnet
iText 7 for .NET is the .NET version of the iText 7 library, formerly known as iTextSharp, which it replaces. iText 7 represents the next level of SDKs for developers that want to take advantage of the benefits PDF can bring. Equipped with a better document engine, high and low-level programming capabilities and the ability to create, edit and enhance PDF documents, iText 7 can be a boon to nearly every workflow.
Stars: ✭ 698 (+2808.33%)
Mutual labels:  encryption
Peazip
Free Zip / Unzip software and Rar file extractor. Cross-platform file and archive manager. Features volume spanning, compression, authenticated encryption. Supports 7Z, 7-Zip sfx, ACE, ARJ, Brotli, BZ2, CAB, CHM, CPIO, DEB, GZ, ISO, JAR, LHA/LZH, NSIS, OOo, PAQ/LPAQ, PEA, QUAD, RAR, RPM, split, TAR, Z, ZIP, ZIPX, Zstandard.
Stars: ✭ 827 (+3345.83%)
Mutual labels:  encryption
Fernet Java8
Java 8 implementation of the Fernet Specification
Stars: ✭ 24 (+0%)
Mutual labels:  encryption
Virgil Crypto Php
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.
Stars: ✭ 22 (-8.33%)
Mutual labels:  encryption
Swiftyrsa
RSA public/private key encryption in Swift
Stars: ✭ 894 (+3625%)
Mutual labels:  encryption

Cryptomute

A small PHP class implementing Format Preserving Encryption via Feistel Network.

1. Installation

You can install Cryptomute via Composer (packagist has loostro/cryptomute package). In your composer.json file use:

{
    "require": {
        "loostro/cryptomute": "^1.0"
    }
}

And run: php composer.phar install. After that you can require the autoloader and use Cryptomute:

2. Usage

require_once 'vendor/autoload.php';

use Cryptomute\Cryptomute;

$cryptomute = new Cryptomute(
    'aes-128-cbc',      // cipher
    '0123456789zxcvbn', // base key
    7,                  // number of rounds
);

$password = '0123456789qwerty';
$iv = '0123456789abcdef';

$plainValue = '2048';
$encoded = $cryptomute->encrypt($plainValue, 10, false, $password, $iv);
$decoded = $cryptomute->decrypt($encoded, 10, false, $password, $iv);

var_dump([
  'plainValue' => $plainValue,
  'encoded'    => $encoded,
  'decoded'    => $decoded,
]);
array(3) {              
  ["plainValue"]=>       
  string(4) "2048"       
  ["encoded"]=>          
  string(9) "309034283"  
  ["decoded"]=>          
  string(4) "2048"       
}                        

3. Options

3.1 Cipher

Cipher is the first constructor argument. Supported cipher methods are:

Cipher IV
des-cbc yes
aes-128-cbc yes
aes-128-ecb no
aes-192-cbc yes
aes-192-ecb no
camellia-128-cbc yes
camellia-128-ecb no
camellia-192-cbc yes
camellia-192-ecb no

3.2 Key

Key is the second constructor argument. Base key from which all round keys are derrived.

3.3 Rounds

Rounds is the third constructor argument. Must be an odd integer greater or equal to 3. More rounds is more secure, but also slower. Recommended value is at least 7.

4. Public methods

4.1 setValueRange($minValue, $maxValue)

Sets minimum and maximum values. If the result is out of range it will be re-encrypted (or re-decrypted) until ouput is in range.

4.2 encrypt($plainValue, $base, $pad, $password, $iv)

Encrypts data. Takes following arguments:

  • $plainValue (string) input data to be encrypted
  • $base (int) input data base, accepted values is 2 (binary), 10 (decimal) or 16 (hexadecimal)
  • $pad (bool) pad left output to match $maxValue's length?
  • $password (string) encryption password
  • $iv (string) initialization vector - only if cipher requires it

4.2 decrypt($cryptValue, $base, $pad, $password, $iv)

Decrypts data. Takes following arguments:

  • $cryptValue (string) input data to be decrypted
  • $base (int) input data base, accepted values is 2 (binary), 10 (decimal) or 16 (hexadecimal)
  • $pad (bool) pad left output to match $maxValue's length?
  • $password (string) encryption password
  • $iv (string) initialization vector - only if cipher requires it

License

Cryptomute is licensed under The MIT License (MIT).

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