kornrunner/secp256k1
A PHP secp256k1 elliptic curve library for key generation, ECDSA signing and verification, and public key recovery. Useful for Ethereum-style cryptography without native extensions.
secp256k1 extension) until volume justifies them.web3p/web3.php and often paired with kornrunner/keccak, adopting it signals willingness to commit to the PHP Ethereum ecosystem — which should inform whether product bets there are strategic or tactical.Adopt when:
ext-secp256k1 extension on your target hosts (shared hosting, PaaS, restrictive containers).web3p / kornrunner ecosystem and want consistent dependencies, or you're prototyping an Ethereum-adjacent feature (EIP-4361 SIWE, address whitelisting, NFT gating).Look elsewhere or defer when:
openssl_* functions cover many ECDSA flows (though curve support varies). If you don't strictly need secp256k1 semantics, avoid adding crypto surface.For executives: This is a small, MIT-licensed PHP library that lets our backend generate and verify cryptographic signatures on the same curve Ethereum and Bitcoin use — the plumbing behind wallet logins and blockchain integrations. It costs nothing to adopt and lets us test Web3 features without new infrastructure or vendor contracts. The trade-off is speed and maturity: it's fine for login verification and moderate usage, but not for high-volume signing or custody of real funds. Recommendation: adopt it with a scoped use — verification-first — and revisit a managed signing service when volume or value justifies it.
For engineering: Pure-PHP secp256k1 with no extension or FFI dependency, which means identical behavior across local, container, and managed-PHP environments and an easier security review than vendored C. It slots in naturally with web3p/web3.php and kornrunner/keccak. Accept the performance hit, isolate it behind an interface (e.g., a SignatureVerifier contract), and design the seam so we can swap to ext-secp256k1 or a remote signer later without touching call sites. Do not let it hold private keys in production without a threat-model review; use it for verification, public-key recovery, and address derivation first.
For stakeholders pushing for a Web3 feature: This dependency is the reason a wallet-login MVP is a sprint, not a quarter. It also draws a clear line — "connect wallet and verify" is in scope today; "hold customer assets" is a separate decision requiring security sign-off and probably a paid vendor.
How can I help you explore Laravel packages today?