Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Jwt Signature Algorithm Eddsa Laravel Package

web-token/jwt-signature-algorithm-eddsa

EdDSA (Ed25519) signature algorithm support for the web-token/jwt-framework. Adds Ed25519 signing and verification to PHP JWT applications, letting you issue and validate compact JWS tokens with modern elliptic-curve cryptography.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit web-token/jwt-signature-algorithm-eddsa is not a standalone library — it is a leaf package in the web-token/jwt-framework monorepo (Spomky-Labs) that registers Ed25519/Ed448 (EdDSA, alg: EdDSA) into the framework's AlgorithmManager. It carries no HTTP, no container bindings, and no Laravel service provider. Its architectural value is entirely conditional on adopting the parent JWT framework, which is Symfony-first (web-token/jwt-bundle) and PSR-7/PSR-15 oriented. In a Laravel codebase, that means either (a) hand-wiring the framework's manager classes into a service provider, or (b) discarding the framework and using a first-party-friendly library that already ships EdDSA. For most Laravel teams, (b) wins — lcobucci/jwt and firebase/php-jwt both support EdDSA via libsodium without this package.

The 15 stars / 0 dependents signal is a measurement artifact, not a quality signal. Split packages in monorepos never accrue stars or GitHub dependents; Composer install counts on the parent (web-token/jwt-framework) are the real metric. A TPM should explicitly reject the raw score here and re-baseline against the parent repo's release cadence, CVE history, and maintainer activity before forming an opinion.

Integration feasibility The only hard runtime dependency is libsodium: ext-sodium (bundled since PHP 7.2) or the paragonie/sodium_compat polyfill. On modern Laravel (PHP 8.1+) running on standard Docker/Ubuntu images, this is a non-issue. It becomes a real blocker on hardened shared hosting, some Alpine/minimal images, and certain managed PHP platforms where extensions are locked — worth a one-hour environment audit before committing.

Key format is the friction point: EdDSA keys in this framework are JWK (JSON Web Key) objects, not PEM. Teams accustomed to openssl_pkey_new / PEM files will need conversion tooling and a key-management story (raw 32-byte seed vs. PEM-wrapped). This is the most common source of integration delay.

Technical risk

  • Low: cryptographic implementation (delegated to libsodium), license (MIT), supply-chain (established maintainer, Composer-signed releases).
  • Medium: bus-factor on the monorepo; algorithm package version must track the parent framework's major version exactly — mismatched majors will fail autoloading or AlgorithmManager registration in confusing ways.
  • High (if misused): algorithm-confusion and alg substitution attacks. The package does not protect you from accepting a token whose header claims a different algorithm than you intended. You must enforce an allow-list at the manager level, not at the package level. This is a design responsibility the package pushes onto the integrator, and it is the single most likely source of a security incident.

Key questions for the team

  1. Do we actually need EdDSA, or is this an inherited requirement from an external IdP? EdDSA's wins (short keys, deterministic signatures, no RNG-per-signature failure mode) matter for IoT/embedded and high-volume issuance — less so for a standard web app where ES256 is equally supported and better tooled.
  2. Are we already committed to web-token/jwt-framework, or would lcobucci/jwt (Laravel-native, well-documented EdDSA support) remove this dependency entirely?
  3. Who owns the JWK rotation process, and does our secrets store (Vault, AWS KMS, encrypted env) hold JWKs or PEM?
  4. What is the interoperating party's exact EdDSA variant — Ed25519 only, or Ed448? The package supports both; consumers frequently assume only one.
  5. Is ext-sodium present in every environment, including CI and any legacy host we still deploy to?

Integration Approach

Stack fit Poor-to-neutral as a direct install. Laravel has no first-party JWT story; the de facto options are tymon/jwt-auth, lcobucci/jwt, or firebase/php-jwt. All three handle EdDSA today. This package only earns its place if the team is deliberately standardizing on the web-token framework — which typically happens in organizations already running Symfony services that share token formats, or where the framework's full JOSE feature set (JWE encryption, JWK sets, key management) is a genuine requirement.

Migration path

  • Greenfield: skip this package. Use lcobucci/jwt with Eddsa signer — fewer moving parts, Laravel-idiomatic, no monorepo version coupling.
  • Already on web-token: add the algorithm package plus web-token/jwt-signature and register it in a small JwtServiceProvider that binds a configured AlgorithmManager and JWSVerifier as singletons. Keep the framework's objects behind your own thin interface so the rest of the app never imports WebToken\* directly.
  • Already on tymon/jwt-auth: do not mix. Migrating to web-token means replacing the entire signing/verification layer and re-issuing keys; that is a project, not an install.

Compatibility Pin the algorithm package to the same major as web-token/jwt-signature and web-token/jwt-framework. Require PHP ≥ 8.1 and ext-sodium. Verify Laravel's container can resolve the framework's constructor-heavy classes without a Symfony DI container — some services expect Psr\Container and need explicit bindings or a bridge such as league/container.

Sequencing

  1. Environment audit (ext-sodium, PHP version, Composer platform requirements).
  2. Decide sign vs. verify only — verification-only is dramatically simpler and covers the common "accept tokens from an external IdP" case.
  3. Prove the key format end-to-end in a throwaway command (JWK in, token out, token verified) before writing application code.
  4. Build JwtServiceProvider with an explicit algorithm allow-list.
  5. Add feature tests covering: valid token, wrong alg header, expired, kid not in set, malformed JWK.
  6. Rotate to dual-key verification (old + new kid) before switching issuance.

Operational Impact

Maintenance Maintenance burden is inherited from the monorepo, not this package. Expect quarterly-ish releases plus prompt security patches; the framework has a credible CVE response record. Your ongoing cost is the major-version coupling: bumping the framework requires bumping this package in lockstep, and major releases have historically included breaking API changes in the manager/verifier layer. Budget one focused upgrade per major cycle.

Support No dedicated support. Issues route to the parent repository. Community support is modest — expect to read source rather than find Stack Overflow answers, and expect guidance to be Symfony-flavored. Internal documentation is mandatory: the team must own a written runbook for key generation, JWK serialization, and rotation, because nothing upstream will describe your specific setup.

Scaling Non-issue. Ed25519 verification is microseconds and stateless; there is no shared state, no network call, no cache to warm. Token verification will not be a throughput bottleneck at any realistic Laravel scale. Key material should be loaded once at boot into a singleton, not re-read per request — that is the only performance consideration.

Failure modes

  • ext-sodium absent → hard failure at autoload/verification time; mitigate with a Composer platform requirement and a health-check endpoint.
  • Version skew between algorithm package and framework → confusing "algorithm not supported" exceptions that look like logic bugs.
  • Key format mismatch (PEM fed to a JWK parser) → opaque parse errors; mitigate with a strict key-loading adapter and startup validation.
  • kid mismatch during rotation → silent verification failures on a subset of tokens; mitigate with dual-key windows and metrics on verification failure by kid.
  • Algorithm confusion → mitigated only by an explicit allow-list; treat this as a required control, not a nice-to-have.
  • Clock skew on exp/nbf → set an explicit leeway (30–60s) rather than relying on defaults.

Ramp-up Two distinct curves. For an engineer comfortable with JOSE, a day. For a team that has only used tymon/jwt-auth's opaque API, expect one to two weeks to internalize JWK, kid, algorithm allow-listing, and the framework's object graph — plus the key-management design work, which is the genuinely hard part and is not a library concern. Factor that into the estimate; the package is small, the operational discipline around it is not.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
adachsoft/php-code-style