Skip to content
CAI
Software that uses CAICheck a score

potatosalad/erlang-jose

63.6

Adequate · 13 November 2026

31.6k

lines of production code

Erlang

with Elixir

8

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Centralized configuration for cryptographic modules and JSON encoders

The \lib/jose.ex\ module now provides a unified API for configuring the underlying cryptographic and serialization implementations used by the library. Users can explicitly set or retrieve the modules used for ChaCha20/Poly1305 encryption, Curve25519 and Curve448 key exchange, SHA3 hashing, and JSON encoding/decoding (supporting Jason, Poison, Jiffy, etc.). Additionally, the module exposes controls for the cryptographic algorithm fallback state and the unsecured signing (\none\ algorithm) toggle, allowing users to manage security defaults and performance trade-offs directly from the main JOSE entry point.

lib · high confidence

Expanded cryptographic support for ChaCha20-Poly1305 and Curve25519/448

The JWA module now includes native implementations for ChaCha20-Poly1305 encryption (with crypto and libsodium backends) and comprehensive support for Curve25519 and Curve448 algorithms, including Ed25519, Ed25519ctx, Ed25519ph, X25519, Ed448, and Ed448ph. These additions provide users with additional authenticated encryption and elliptic-curve signature/key-agreement options, with fallback mechanisms ensuring graceful degradation when specific backend libraries are unavailable.

src/jwa · high confidence

Initial project scaffolding and tooling configuration

This change establishes the foundational build and development environment for the project. It introduces Elixir tooling by adding \.formatter.exs\ for code formatting and \.dialyzer\_ignore.exs\ to suppress initial Dialyzer type-spec warnings. The build system is updated with a comprehensive \Makefile\ supporting Docker-based testing, \erlfmt\, and \eqwalize\, alongside a \rebar.config\ that configures Dialyzer and Xref checks. Documentation is added via \ALGORITHMS.md\ and \CHANGELOG.md\, and the project license is switched from MPL-2.0 to MIT.

(repo-wide) · high confidence

Initial release of the JOSE Elixir library

This change introduces the JOSE library for Elixir, providing implementations for JSON Web Algorithms (JWA), JSON Web Encryption (JWE), JSON Web Signature (JWS), JSON Web Key (JWK), and JSON Web Token (JWT) as defined in RFC 7515–7519. The library supports a wide range of cryptographic algorithms including AES, ChaCha20/Poly1305, RSA, ECDSA, Ed25519, Ed448, and ECDH variants (ECDH-ES, ECDH-SS, ECDH-1PU). It includes a crypto fallback mechanism for algorithms not natively supported by the current Erlang/OTP version, integrates with the Poison JSON library for encoding/decoding, and provides utilities for handling Firebase certificate keys and various key formats (PEM, DER, OpenSSH).

lib/jose · high confidence

New JWE algorithms and encryption modes for key agreement and password-based wrapping

The JWE module now supports additional key agreement algorithms (ECDH-1PU, ECDH-ES, ECDH-SS) and password-based key wrapping (PBES2 with HS256/HS384/HS512). It also introduces new content encryption and key-wrapping combinations using Curve20P (C20PKW) and XCurve20P (XC20PKW) with ChaCha20-Poly1305, as well as AES-GCM and AES-KW key wrapping for the ECDH algorithms.

src/jwe · high confidence

Behavioural changes

2 commits (1 fix) modifying scripts

A change to existing behaviour in scripts — 2 commits (1 fix), 1 file: “Fix make hexdocs-publish and build release docs by default”; “Build HexDocs in Docker and publish the tarball from the host”.

scripts · medium confidence · unverified

Add lexical JSON encoder for improved Poison compatibility

Introduces a new \JOSE.Poison.LexicalEncoder\ module to provide a lexical JSON encoding implementation, addressing compatibility issues with newer versions of the Poison library (specifically supporting Poison 4.x). This change replaces or supplements previous encoding strategies, ensuring that JSON serialization within the JOSE library remains robust and warning-free across different Poison versions.

lib/jose/poison · high confidence

Core library refactored for OTP 23+ compatibility and modular crypto support

The \src\ directory has been restructured to support newer Erlang/OTP versions and improve modularity. A new \jose\_crypto\_compat\ module provides a unified API that bridges the gap between legacy OTP 22 and older crypto functions (like \crypto:block\_encrypt\) and the OTP 23+ API (like \crypto:crypto\_init\ and \crypto:crypto\_one\_time\_aead\). The application structure now uses a dedicated \jose\_server\ gen\_server to manage runtime configuration for crypto modules (ChaCha20, Curve25519, JSON encoders) and limits (PBES2 count, ZIP size), replacing the previous static configuration approach. Several legacy modules (\jose\_jwa\, \jose\_jwe\_alg\_ecdh\_es\, \jose\_jwe\_alg\_pbes2\, \jose\_jwe\_zip\, \jose\_jwk\, \jose\_jwk\_kty\, \jose\_jwk\_kty\_ec\) have been removed or significantly refactored to align with this new architecture, while \jose\_public\_key\ now includes robust fallback logic for PEM/DER decoding and PBES2 encryption handling across different OTP versions.

src · high confidence

Expanded JWK support for EdDSA, ECDH, and DER formats with security hardening

The JWK module now supports additional key types and algorithms, including EdDSA (Ed25519, Ed448, and their prehashed variants), X25519, and ECDH-1PU/ES/SS key agreement modes. It also adds DER/PEM import/export capabilities for asymmetric keys and strengthens PBES2 defaults for password-protected key exports. To address security vulnerabilities, the change bounds RSA prime recovery work and fixes unbounded recursion in shared secret generation, while also rejecting non-canonical ECDSA signature lengths.

src/jwk · high confidence

JSON encoding now supports multiple backends via a unified interface

The library now allows users to choose their preferred JSON library (Jiffy, Jason, JSone, JSX, ojson, Poison, Thoas, or the native OTP json module) through a new \jose\_json\ behavior. This change ensures consistent encoding behavior across different backends, such as canonical ordering for Jiffy and binary output guarantees, while providing a fallback for unsupported modules.

src/json · high confidence

Refactor codegen to use parse\_transform for base64 modules

The codegen tool now uses the \jose\_base\ parse\_transform to automatically generate \encode\_char\ and \encode\_pair\ functions for \jose\_base64\ and \jose\_base64url\ modules. This replaces the previous manual or script-based generation approach, simplifying the build process by having the Erlang compiler handle the transformation during compilation.

codegen · high confidence

Updated JOSE include headers with JWT record, JWS b64 header, and compatibility macros

The include directory now provides a jose\_jwt.hrl defining the jose\_jwt record for JWT handling, and jose\_compat.hrl offering macros to normalize stacktrace capture across OTP 21–22 and OTP 23+. jose\_jws.hrl adds a b64 field to the jose\_jws record to support the b64 header, while jose\_public\_key.hrl introduces records and OIDs for Curve25519, Curve448, and EdDSA keys, along with PBES2 export defaults (16-byte salt, 600,000 iterations). jose.hrl now includes jose\_jwt.hrl, and jose\_jwk.hrl removes the jose\_jwk\_set record and adds a keys field to jose\_jwk.

include · high confidence

Test coverage

Added JWE and JWS test data fixtures; Expanded property test coverage for JOSE cryptographic primitives; Expanded test suite with CAVP vectors and property-based testing.

Dependencies

Update JOSE dependencies and lockfile

The project's dependency manifest (mix.exs) and lockfile (mix.lock) have been updated to resolve specific versions for development and test dependencies. Key updates include libdecaf to 2.1.1, libsodium to 2.0.1, and poison to 6.0.0, alongside updates to documentation tools like ex\_doc (0.37.3) and dialyxir (1.4.5).

(dependencies) · high confidence

Housekeeping

Added empty placeholder file in priv directory

An empty .keep file was added to the priv directory. This is a common pattern in Elixir/OTP projects to ensure the directory is tracked by version control systems, as Git ignores empty directories by default. This change has no functional impact on the application.

priv · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 62 → 64 (+1.4)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.3) — scores are not directly comparable.

Lenses

  • Code Health 70 → 65 (-4.5)
  • Architecture 82 → 100 (+18.3)
  • Maturity 53 → 54 (+1.3)
  • Readiness 60 → 60 (+0.5)
  • Security 98 → 98 (-0.5)
  • Event Sourcing 100 → 100 (+0.0)

Resolved (14)

  • Duplicated block (10 lines × 2) (codegen/jose_base64.erl)
  • Duplicated block (10 lines × 2) (codegen/jose_base64url.erl)
  • Duplicated block (12 lines × 2) (codegen/jose_base64.erl)
  • Duplicated block (12 lines × 2) (codegen/jose_base64url.erl)
  • Duplicated block (18–19 lines × 2) (src/jose_server.erl)
  • Duplicated block (6–7 lines × 4) (codegen/jose_base64.erl)
  • Duplicated block (6–7 lines × 4) (codegen/jose_base64url.erl)
  • Medium CVE: EEF-[CVE redacted] (mix.lock)
  • Off-boarding risk: anonymized user #1
  • Orphaned file (.dialyzer_ignore.exs)
  • Outdated: ex_doc
  • Outdated: jason
  • Projects may be oversized for their cohesion
  • Retired release: earmark

New (140)

  • Duplicated block (27 lines × 2) (codegen/jose_base64.erl)
  • Duplicated block (27 lines × 2) (codegen/jose_base64url.erl)
  • Duplicated block (27–28 lines × 2) (src/jose_server.erl)
  • Duplicated block (6–7 lines × 4) (codegen/jose_base64.erl)
  • Duplicated block (6–7 lines × 4) (codegen/jose_base64url.erl)
  • Edited copies of one member (3 members, 16+ corresponding lines) (src/jose_public_key.erl)
  • Edited copies of one member (3 members, 17+ corresponding lines) (src/jwa/jose_jwa_pkcs1.erl)
  • Edited copies of one member (3 members, 18+ corresponding lines) (src/jwa/jose_jwa_pkcs1.erl)
  • Edited copies of one member (3 members, 18+ corresponding lines) (src/jwa/jose_jwa_pkcs1.erl)
  • Edited copies of one member (3 members, 23+ corresponding lines) (src/jwe/jose_jwe_alg_ecdh_1pu.erl)
  • Edited copies of one member (3 members, 3+ corresponding lines) (src/jwa/chacha20_poly1305/jose_chacha20_poly1305_crypto.erl)
  • Edited copies of one member (3 members, 4+ corresponding lines) (src/jwe/jose_jwe_alg_ecdh_1pu.erl)
  • Edited copies of one member (3 members, 6+ corresponding lines) (src/jwa/jose_jwa_ed25519.erl)
  • Edited copies of one member (3 members, 6+ corresponding lines) (src/jwe/jose_jwe_alg_aes_kw.erl)
  • Edited copies of one member (3 members, 6+ corresponding lines) (src/jwe/jose_jwe_alg_aes_kw.erl)
  • Edited copies of one member (3 members, 6+ corresponding lines) (src/jwe/jose_jwe_alg_rsa.erl)
  • Edited copies of one member (3 members, 6+ corresponding lines) (src/jwk/jose_jwk.erl)
  • Edited copies of one member (3 members, 6+ corresponding lines) (src/jwk/jose_jwk.erl)
  • Edited copies of one member (3 members, 7+ corresponding lines) (src/jwk/jose_jwk.erl)
  • Edited copies of one member (3 members, 8+ corresponding lines) (src/jws/jose_jws_alg_ecdsa.erl)
  • …and 120 more

Changes since last survey

  • 18 commits — 13 feature/other, 5 fixes

By area

  • (root) — 13 commits
  • src/jose_public_key.erl — 1 commit
  • src/jose_server.erl — 1 commit
  • src/jwa — 1 commit
  • src/jwk — 1 commit
  • test/cavp_SUITE.erl — 1 commit

Notable commits

  • fix: Fix CI: disable erlang.mk Elixir builds and refresh Dialyzer ignores
  • fix: Fix Concat KDF hang when KeyDataLen is zero or negative
  • fix: Fix PKCS#8 decoding and EC SubjectPublicKeyInfo encoding on OTP 29
  • fix: Fix make hexdocs-publish and build release docs by default
  • fix: Revert "Publish HexDocs from GitHub Actions"
  • change: Add HexDocs badge to README [skip ci]
  • change: Build HexDocs in Docker and publish the tarball from the host
  • change: Commit mix.lock and always install Hex and rebar in CI
  • change: Do not return shared-factor bases as RSA primes during SFM recovery
  • change: Expect truncated GCM tags to be rejected in CAVP decrypt vectors
  • change: Ignore erlang.mk's generated lock.mk
  • change: Publish HexDocs from GitHub Actions
  • change: Refuse to build docs on case-insensitive file systems
  • change: Replace deprecated catch expressions with try ... catch
  • change: Update Mix dependency requirements and drop earmark
  • change: Update erlang.mk, test dependencies and CI for OTP 29
  • change: Upgrade libsodium test dependency to 3.0.0
  • change: Version 1.11.13

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

potatosalad/erlang-jose was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 13 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 4de24ea4b63dd7256b796921252c69958248a05c — the exact code this score is about.
  • Scored under rubric-2026.11.3 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.61+preprod-b8b1a43ae4c3.