An Elixir encryption library implementing best practices for secure data encryption with Ecto integration.
Cloak is an Elixir encryption library that provides secure encryption with best practices like random initialization vectors and tagged ciphertexts. It simplifies encryption tasks for developers and integrates seamlessly with Ecto for database field encryption. The library is built on Erlang's crypto library, ensuring robust security foundations.
Elixir developers building applications that require secure data encryption, especially those using Ecto for database interactions and needing transparent field encryption.
Developers choose Cloak for its Elixir-native design, ease of key rotation through tagged ciphertexts, and strong integration with Ecto, making it a reliable and developer-friendly encryption solution.
Elixir encryption library designed for Ecto
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses :crypto.strong_rand_bytes to generate unique initialization vectors for each encryption, reducing IV reuse risks and simplifying secure storage as highlighted in the README.
Tagged ciphertexts embed algorithm and key metadata, enabling automatic decryption and straightforward key migration without data loss, a core feature for maintaining security.
Configurable Vault modules integrate with Elixir's supervision tree, supporting multiple independent vaults simultaneously, ideal for umbrella apps or multi-tenant systems.
The cloak_ecto package allows transparent encryption of database fields, minimizing boilerplate code for developers using Ecto, as evidenced in the documentation.
Major updates, like from 0.9.x to 1.0.x, require migration efforts, as indicated by the dedicated upgrade guide, which can disrupt existing deployments.
Relies solely on Erlang's crypto library, so support for newer or niche encryption algorithms is constrained unless custom ciphers are implemented, adding complexity.
Setting up multiple vaults and ciphers involves detailed Elixir configuration, which might be overkill for simple use cases and increases initial setup time.