Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Cryptography
  3. ex_crypto

ex_crypto

MITElixirv0.10.0

An Elixir wrapper for Erlang's crypto and public_key modules, providing simplified, secure cryptography functions with sane defaults.

GitHubGitHub
161 stars51 forks0 contributors

What is ex_crypto?

ExCrypto is an Elixir library that provides a wrapper around Erlang's crypto and public_key modules, simplifying cryptographic operations like encryption, decryption, signing, and key generation. It aims to make writing secure Elixir applications easier by offering idiomatic APIs and sensible defaults, reducing the learning curve and potential for errors when implementing cryptography.

Target Audience

Elixir developers who need to integrate cryptographic functions—such as secure messaging, data encryption, or digital signatures—into their applications without dealing directly with Erlang's low-level crypto APIs.

Value Proposition

Developers choose ExCrypto because it provides a clean, Elixir-native interface to Erlang's robust cryptography libraries, with built-in conveniences like default parameters and base64 key encoding. It reduces boilerplate and complexity while ensuring security best practices are followed.

Overview

Wrapper around the Erlang crypto module for Elixir.

Use Cases

Best For

  • Adding RSA-based digital signatures to JSON payloads in Elixir APIs
  • Generating AES keys for symmetric encryption in Elixir applications
  • Implementing secure message transmission with public-key cryptography
  • Simplifying integration of Erlang crypto functions into Elixir projects
  • Building authentication systems that require payload signing and verification
  • Encrypting sensitive data with AES in Elixir-based services

Not Ideal For

  • Applications requiring elliptic-curve cryptography (ECC) or other modern algorithms not exposed by the wrapper
  • High-performance systems where direct Erlang :crypto calls are necessary to minimize abstraction overhead
  • Projects needing built-in password hashing or key derivation functions, as ExCrypto focuses on message encryption and signing
  • Teams looking for extensive community tutorials or frequent updates beyond the stable but narrow feature set

Pros & Cons

Pros

Clean Elixir API

Wraps Erlang's low-level crypto and public_key modules into idiomatic Elixir functions, such as ExPublicKey.sign/verify, making cryptographic operations more accessible and less error-prone for developers.

Sensible Defaults

Provides built-in defaults for common tasks, like generating AES keys in base64 format with ExCrypto.generate_aes_key/2, reducing boilerplate and simplifying implementation.

Focus on Security Practices

Includes practical examples for secure message authentication, such as signing JSON payloads with timestamps, which promotes best practices in payload integrity and sender verification.

Easy Key Management

Supports loading RSA keys from PEM files and generating AES keys in various lengths (128, 192, 256-bit), with options for byte or base64 output, streamlining key handling.

Cons

Limited Algorithm Scope

Primarily focuses on RSA and AES from Erlang's modules, lacking explicit support for newer algorithms like ECC, which might be necessary for modern cryptographic applications.

Wrapper Overhead

Adds a layer of abstraction over direct Erlang calls, which could introduce minor performance overhead, though it's designed for simplicity rather than raw speed.

Sparse Advanced Guidance

While basic examples are provided, such as for JSON signing, more complex scenarios or edge cases might require developers to fall back to Erlang documentation for deeper customization.

Frequently Asked Questions

Quick Stats

Stars161
Forks51
Contributors0
Open Issues8
Last commit2 years ago
CreatedSince 2015

Tags

#elixir#public-key#rsa#encryption#security#digital-signatures#aes#cryptography

Built With

E
Erlang
E
Elixir

Included in

Elixir13.1kCryptography6.8k
Auto-fetched 17 hours ago

Related Projects

comeonincomeonin

Password hashing specification for the Elixir programming language

Stars1,317
Forks63
Last commit1 year ago
comeonincomeonin

Password hashing specification for the Elixir programming language

Stars1,317
Forks63
Last commit1 year ago
cloakcloak

Elixir encryption library designed for Ecto

Stars623
Forks56
Last commit4 months ago
nimble_totpnimble_totp

A tiny Elixir library for time-based one time passwords (TOTP)

Stars476
Forks23
Last commit3 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub