All Projects → rocketjob → Symmetric Encryption

rocketjob / Symmetric Encryption

Licence: apache-2.0
Symmetric Encryption for Ruby Projects using OpenSSL

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Symmetric Encryption

symmetric-encryption
Symmetric Encryption for Ruby Projects using OpenSSL
Stars: ✭ 454 (+4.13%)
Mutual labels:  encryption, openssl, compliance
Databunker
Secure storage for personal records built to comply with GDPR
Stars: ✭ 122 (-72.02%)
Mutual labels:  encryption, compliance
Open Crypto
🔑 Hashing (BCrypt, SHA2, HMAC), encryption (AES), public-key (RSA), and random data generation.
Stars: ✭ 115 (-73.62%)
Mutual labels:  encryption, openssl
Openssl For Iphone
A script for compiling OpenSSL for iOS Devices (iPhone, iPad, iPod Touch, AppleTV, MacCatalyst)
Stars: ✭ 2,190 (+402.29%)
Mutual labels:  encryption, openssl
Wolfssl
wolfSSL (formerly CyaSSL) is a small, fast, portable implementation of TLS/SSL for embedded devices to the cloud. wolfSSL supports up to TLS 1.3!
Stars: ✭ 1,098 (+151.83%)
Mutual labels:  encryption, openssl
Dcrypt
🔐A petite library of encryption functions for PHP
Stars: ✭ 93 (-78.67%)
Mutual labels:  encryption, openssl
Mutual Tls Ssl
🔐 Tutorial of setting up Security for your API with one way authentication with TLS/SSL and mutual mutual authentication for a java based web server and a client with both Spring Boot. Different clients are provided such as Apache HttpClient, OkHttp, Spring RestTemplate, Spring WebFlux WebClient Jetty and Netty, the old and the new JDK HttpClient, the old and the new Jersey Client, Google HttpClient, Unirest, Retrofit, Feign, Methanol, vertx, Scala client Finagle, Featherbed, Dispatch Reboot, AsyncHttpClient, Sttp, Akka, Requests Scala, Http4s Blaze, Kotlin client Fuel, http4k, Kohttp and ktor. Also other server examples are available such as jersey with grizzly. Also gRPC examples are included
Stars: ✭ 163 (-62.61%)
Mutual labels:  encryption, openssl
Cryptr
A simple shell utility for encrypting and decrypting files using OpenSSL.
Stars: ✭ 81 (-81.42%)
Mutual labels:  encryption, openssl
Openssl
TLS/SSL and crypto library
Stars: ✭ 17,157 (+3835.09%)
Mutual labels:  encryption, openssl
php-simple-encryption
The PHP Simple Encryption library is designed to simplify the process of encrypting and decrypting data while ensuring best practices are followed. By default is uses a secure encryption algorithm and generates a cryptologically strong initialization vector so developers do not need to becomes experts in encryption to securely store sensitive data.
Stars: ✭ 32 (-92.66%)
Mutual labels:  encryption, openssl
Underlock
Underlock makes it dead simple to encrypt and decrypt your data and files. It comes with little to no dependencies and has a very small API surface.
Stars: ✭ 128 (-70.64%)
Mutual labels:  encryption, openssl
kodex
A privacy and security engineering toolkit: Discover, understand, pseudonymize, anonymize, encrypt and securely share sensitive and personal data: Privacy and security as code.
Stars: ✭ 70 (-83.94%)
Mutual labels:  encryption, compliance
Armor
Armor is a simple Bash script designed to create encrypted macOS payloads capable of evading antivirus scanners.
Stars: ✭ 228 (-47.71%)
Mutual labels:  encryption, openssl
cyphr
Humane encryption
Stars: ✭ 91 (-79.13%)
Mutual labels:  encryption, openssl
Gonnacry
A Linux Ransomware
Stars: ✭ 341 (-21.79%)
Mutual labels:  encryption, openssl
Libzip
A C library for reading, creating, and modifying zip archives.
Stars: ✭ 379 (-13.07%)
Mutual labels:  encryption
S2n Tls
s2n : an implementation of the TLS/SSL protocols
Stars: ✭ 4,029 (+824.08%)
Mutual labels:  encryption
Raasnet
Open-Source Ransomware As A Service for Linux, MacOS and Windows
Stars: ✭ 371 (-14.91%)
Mutual labels:  encryption
Rxfingerprint
Android Fingerprint authentication and encryption with RxJava
Stars: ✭ 373 (-14.45%)
Mutual labels:  encryption
Link Lock
Password-protect URLs using AES in the browser; create hidden bookmarks without a browser extension
Stars: ✭ 418 (-4.13%)
Mutual labels:  encryption

Symmetric Encryption

Gem Version Build Status Downloads License Gitter chat

Transparently encrypt ActiveRecord, Mongoid, and MongoMapper attributes. Encrypt passwords in configuration files. Encrypt entire files at rest.

Introduction

Any project that wants to meet PCI compliance has to ensure that the data is encrypted whilst in flight and at rest. Amongst many other requirements all passwords in configuration files also have to be encrypted.

Symmetric Encryption helps achieve compliance by supporting encryption of data in a simple and consistent way.

Symmetric Encryption uses OpenSSL to encrypt and decrypt data, and can therefore expose all the encryption algorithms supported by OpenSSL.

Documentation

Symmetric Encryption Guide

Reference Documentation

Rocket Job

Checkout the sister project Rocket Job: Ruby's missing batch system.

Fully supports Symmetric Encryption to encrypt data in flight and at rest while running jobs in the background.

Upgrading to SymmetricEncryption V4

Version 4 of Symmetric Encryption has completely adopted the Ruby keyword arguments on most API's where multiple arguments are being passed, or where a Hash was being used before.

The encrypt and decrypt API now require keyword arguments for any optional arguments.

The following does not change:

encrypted = SymmetricEncryption.encrypt('Hello World')
SymmetricEncryption.decrypt(encrypted)

The following is not backward compatible:

SymmetricEncryption.encrypt('Hello World', false, false, :date)

Needs to be changed to:

SymmetricEncryption.encrypt('Hello World', random_iv: false, compress: false, type: :date)

Or, just to change the type:

SymmetricEncryption.encrypt('Hello World', type: :date)

Similarly the decrypt api has also changed:

SymmetricEncryption.decrypt(encrypted, 2, :date)

Needs to be changed to:

SymmetricEncryption.decrypt(encrypted, version: 2, type: :string)

The Rake tasks have been replaced with a new command line interface for managing key configuration and generation. For more info:

symmetric-encryption --help

Configuration changes

In Symmetric Encryption V4 the configuration file is now modified directly instead of using templates. This change is necessary to allow the command line interface to generate new keys and automatically update the configuration file.

Please backup your existing symmetric-encryption.yml prior to upgrading if it is not already in a version control system. This is critical for configurations that have custom code or for prior configurations targeting heroku.

In Symmetric Encryption V4 the defaults for encoding and always_add_header have changed. If these values are not explicitly set in the symmetric-encryption.yml file, set them prior to upgrading.

Prior defaults, set explicitly to these values if missing for all environments:

      encoding:          :base64
      always_add_header: false

New defaults are:

      encoding:          :base64strict
      always_add_header: true

Upgrading to SymmetricEncryption V3

In version 3 of SymmetricEncryption, the following changes have been made that may have backward compatibility issues:

  • SymmetricEncryption.decrypt no longer rotates through all the decryption keys when previous ciphers fail to decrypt the encrypted string. In a very small, yet significant number of cases it was possible to decrypt data using the incorrect key. Clearly the data returned was garbage, but it still returned a string of data instead of throwing an exception. See SymmetricEncryption.select_cipher to supply your own custom logic to determine the correct cipher to use when the encrypted string does not have a header and multiple ciphers are defined.

  • Configuration file format prior to V1 is no longer supported.

  • New configuration option has been added to support setting encryption keys from environment variables.

  • Cipher.parse_magic_header! now returns a Struct instead of an Array.

  • New config options :encrypted_key and :encrypted_iv to support setting the encryption key in environment variables, or from other sources such as ldap or a central directory service.

New features in V1.1 and V2

  • Ability to randomly generate a new initialization vector (iv) with every encryption and put the iv in the encrypted data as its header, without having to use SymmetricEncryption::Writer.

  • With file encryption randomly generate a new key and initialization vector (iv) with every file encryption and put the key and iv in the encrypted data as its header which is encrypted using the global key and iv.

  • Support for compression.

  • SymmetricEncryption.encrypt has two additional optional parameters:

    • random_iv [true|false]

      • Whether the encypted value should use a random IV every time the field is encrypted.
      • It is recommended to set this to true where feasible. If the encrypted value could be used as part of a SQL where clause, or as part of any lookup, then it must be false.
      • Setting random_iv to true will result in a different encrypted output for the same input string.
      • Note: Only set to true if the field will never be used as part of the where clause in an SQL query.
      • Note: When random_iv is true it will add a 8 byte header, plus the bytes to store the random IV in every returned encrypted string, prior to the encoding if any.
      • Note: Adds a 6 byte header prior to encoding, if not already configured to add the header to all encrypted values.
      • Default: false
      • Highly Recommended where feasible: true
    • compress [true|false]

      • Whether to compress prior to encryption.
      • Should only be used for large strings since compression overhead and the overhead of adding the 'magic' header may exceed any benefits of compression.
      • Default: false

Author

Reid Morrison

Contributors

Versioning

This project uses Semantic Versioning.

Disclaimer

Although this library has assisted in meeting PCI Compliance and has passed previous PCI audits, it in no way guarantees that PCI Compliance will be achieved by anyone using this library.

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