Django Encrypted Fields

screenshot of Django Encrypted Fields

This is a collection of Django Model Field classes that are encrypted using Keyczar.

Overview

Django Encrypted Fields is a powerful tool designed for Django developers who want to enhance the security of their applications. By leveraging the Keyczar crypto library, this collection of encrypted model field classes ensures that sensitive data is protected at rest without complicating the overall development process. Its integration with Django makes it a seamless addition to projects that prioritize data privacy.

In a digital world where data breaches are increasingly common, Django Encrypted Fields allows developers to encrypt various data types directly within their models. This not only safeguards user information but also adheres to best practices in data protection. The ease of implementation combined with the effectiveness of encryption makes this library a valuable asset for any Django-based application.

Features

  • Comprehensive Encryption Support: Built-in fields include EncryptedCharField, EncryptedTextField, EncryptedDateTimeField, EncryptedIntegerField, EncryptedFloatField, EncryptedEmailField, and EncryptedBooleanField to cover a wide range of data types.

  • Key Management: Utilizes Keyczar for creating and managing encryption keys, supporting easy key rotation and expiration of old keys.

  • Seamless Integration: Designed to integrate smoothly into Django's existing model framework, allowing developers to work with encrypted data as they would with unencrypted fields.

  • User-Friendly API: Exposes a simple and straightforward API for setting encryption parameters such as algorithm and key size within the keyfile.

  • Field Upgradeability: Supports easy upgrading of pre-existing fields with minimal hassle thanks to a handy mixin, making it adaptable to evolving project needs.

  • Security Focused: Once data is encrypted, it is protected from being queried or sorted in a way that exposes sensitive information, presenting it as random noise in the database.

  • Robust Testing: Fields are currently built-in and unit-tested, ensuring reliability for developers when implementing these encrypted types.