Encrypt is a Drupal module that provides an application programming interface (API) for performing symmetric or asymmetric encryption. It allows integrating modules to encrypt and decrypt data in a standardized manner. It doesn't provide any user-facing features of its own, aside from administration pages to manage encryption profiles.

Encryption Profiles

Encrypt allows the creation of any number of encryption profiles that may then be used by other modules to encrypt and decrypt data.

Encryption Methods

Encryption methods are defined as plugins, so a variety of ciphers can be supported. Encrypt for Drupal 7 includes three encryption methods.

Drupal 8 Note:

The Drupal 8 version of Encrypt does not include any encryption methods. You will need to install at least one module that provides an encryption method See the "Modules That Integrate With Encrypt" section below.

Keys

A key is required to perform encryption or decryption. Encrypt for Drupal 7 supports multiple key providers via plugins. Encrypt for Drupal 8 requires the Key module for key management.

Asymmetric Encryption

If you are looking to do asymmetric encryption, or client-side encryption, there are now a few options available. The Encrypt RSA and Pubkey Encrypt modules allow for asymmetric encryption through the encrypt module while the Client-Side File Crypto and Client-Side Content Encryption currently are not integrated with encrypt. We're currently working to standardize methods and code to make these modules all compatible with each other and the encrypt module.

Modules That Integrate With Encrypt

Drupal 8

Module Version Encrypt Compatibility Symmetric or asymmetric Notes
Real AES 8.x-2.x 8.x-3.x Symmetric Adds an encryption method that uses the Defuse PHP-encryption library to provide highly secure authenticated encryption.
Encrypt KMS 8.x-1.x 8.x-3.x Symmetric Adds an encryption method that uses Amazon KMS.
Sodium 8.x-2.x 8.x-3.x Symmetric Provides support for encryption using the Halite PHP library and the Sodium (libsodium) software library.
Encrypt RSA 8.x-1.x 8.x-3.x Asymmetric Provides support for asymmetric encryption using the RSA algorithm.
Pubkey Encrypt 8.x-1.x 8.x-3.x Asymmetric Provides support for asymmetric encryption.
Field Encryption 8.x-2.x 8.x-3.x Symmetric Encrypts entity fields.
Webform Encrypt 8.x-1.x 8.x-3.x Symmetric Encrypts data submitted via webform.
File Encrypt 8.x-1.x 8.x-3.x Symmetric Encrypts files using the core file field.
Salesforce Suite 8.x-3.x 8.x-3.x Symmetric Used in the Salesforce Encrypt submodule to protect access tokens.

Drupal 7

Module Version Encrypt Compatibility Notes
Encrypt Password 7.x-1.0-beta2 7.x-2.x Encrypts the hashes of user passwords.
Field Encryption 7.x-1.0-beta3 7.x-1.1, 7.x-2.x Encrypts entity fields.
Webform Encrypt 7.x-1.3 7.x-2.3 Encrypts data submitted via webform.
Townsend Security Key Connection 7.x-1.1 7.x-1.1, 7.x-2.x Adds a key provider for offsite key storage; adds an encryption method for offsite data encryption.
Real AES 7.x-1.2 7.x-2.x Adds an encryption method that uses the Defuse PHP-encryption library to provide highly secure authenticated encryption.
Encrypt Form API 7.x-2.x 7.x-1.1, 7.x-2.x Adds a Form API attribute (#encrypt).
Encrypted Files 7.x-2.x-dev 7.x-2.x Provides the ability to encrypt uploaded files.
Sodium 7.x-1.x 7.x-2.x Provides support for encryption using the Halite PHP library and the Sodium (libsodium) software library.
Supporting organizations: 
sponsored development

Project information

Releases