public-square/jwt-framework-schnorr
Adds Schnorr signature support to JWT workflows in PHP and Laravel, letting you issue and verify compact, tamper-evident tokens using modern public-key cryptography. A focused integration for developers needing Schnorr-based JWT signing.
Architecture fit. This is a Laravel-oriented cryptographic signing package, and v0.1.0 introduces Schnorr signatures with experimental secp256k1 support ("SS256K" in the notes — presumably a rendering of secp256k1; confirm with the maintainer), a test suite, and Composer metadata. Framework fit is idiomatic: expect a service provider, publishable config, and a facade or injectable signer contract. The architectural question is not whether it plugs into Laravel but where in the request lifecycle signing sits. Schnorr signing is CPU-bound elliptic-curve work; if it lands on a synchronous request path (per-request auth, webhook signing, API tokens) it becomes a latency and capacity line item. It belongs behind a queue or a dedicated signing boundary unless the volume is demonstrably trivial.
Integration feasibility. Composer-installable and greenfield — no migration burden. A credible spike is one to two engineer-days: install, sign, verify against BIP-340 test vectors, benchmark. Production feasibility is not established by this release. v0.1.0 plus an explicit "Experimental" label on the curve support means the API surface and the cryptography are both still moving.
Technical risk.
libsecp256k1, ext-sodium, or pure-PHP big-integer arithmetic via GMP. Pure-PHP paths are slow and typically not constant-time; timing side channels are a real, if harder-to-exploit, exposure. Which backend this package uses, and what it falls back to when ext-ffi/ext-gmp are absent, is the make-or-break unknown.php artisan config:cache writes them to a serialized cache file on disk. That is a common and serious misconfiguration path.Key questions for the maintainer.
require/ext-* constraints, and the supported PHP/Laravel matrix?SECURITY.md, a disclosure process, and a named maintainer with crypto background?@internal/@experimental where appropriate, and is there a stated path to 1.0?Stack fit. Verify against our actual matrix before anything else: PHP version, Laravel major, and the presence of ext-gmp / ext-sodium / ext-ffi in both container images and CI runners. FFI is frequently disabled on hardened or shared hosting images — confirm the fallback is acceptable, not merely present. If we run Octane, confirm the package holds no mutable static state across requests.
Migration path. None required — no incumbent. That is an opportunity, not a reprieve: introduce it behind an internal Signer interface (sign(bytes): string, verify(pub, msg, sig): bool) so the package is an implementation detail. Given the pre-1.0 status, a swap is likely and should cost an afternoon, not a sprint.
Compatibility. Pin exactly (composer require vendor/pkg:0.1.*) and commit the lock file. Treat Composer updates for this package as reviewed changes, not automated merges — Renovate/Dependabot should open a PR, not auto-merge, for anything in the crypto path.
Sequencing.
Maintenance. Expect churn: pre-1.0 releases can and will rename, restructure, and change defaults. Budget for a review of every upstream release, and track the project's activity — a crypto package that goes quiet is a liability, not a stable dependency. Vendor the version we ship and keep an offline copy of the exact source we audited.
Support. Assume no commercial support and no LTS. Absent a security disclosure policy, we have no private channel for reporting or receiving vulnerability information — that alone is a gate for high-value use. Identify a named internal owner; "the team" is not an owner for a cryptographic component.
Scaling. Signing is CPU-bound and stateless, so horizontal scaling is straightforward — but measure it. If per-node keys are generated or held locally, key distribution and rotation become an operational problem that dwarfs the compute cost. Prefer a KMS/HSM or a single signing service over per-instance key material as volume grows.
Failure modes.
config/.Signer abstraction, exercised at least once.Ramp-up. Two to three engineer-days of genuine reading, not tutorial-following: BIP-340, nonce generation, and the difference between "verifies locally" and "interoperates." A team that cannot explain why nonce reuse is fatal should not own this integration. Pair the adopting engineer with whoever owns secrets management before, not after, the first production deploy.
Bottom line. Adopt for a scoped spike and non-critical signing now; block production use on customer-facing or asset-moving paths until the backend, BIP-340 conformance, and security-disclosure questions are answered and interop is proven against a second implementation.
How can I help you explore Laravel packages today?