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.
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
AlgorithmManager registration in confusing ways.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
web-token/jwt-framework, or would lcobucci/jwt (Laravel-native, well-documented EdDSA support) remove this dependency entirely?ext-sodium present in every environment, including CI and any legacy host we still deploy to?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
lcobucci/jwt with Eddsa signer — fewer moving parts, Laravel-idiomatic, no monorepo version coupling.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.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
ext-sodium, PHP version, Composer platform requirements).JwtServiceProvider with an explicit algorithm allow-list.alg header, expired, kid not in set, malformed JWK.kid) before switching issuance.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.kid mismatch during rotation → silent verification failures on a subset of tokens; mitigate with dual-key windows and metrics on verification failure by kid.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.
How can I help you explore Laravel packages today?