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

Cose Lib Laravel Package

web-auth/cose-lib

CBOR Object Signing and Encryption (COSE) library for PHP with full support for COSE_Sign1, Sign, Encrypt0, Encrypt, Mac0 and Mac tags, plus ECDSA, EdDSA, RSA, HMAC algorithms. PHP 8.1+ and WebAuthn/FIDO2 compatible.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Passwordless/passkey roadmap: COSE is the signing/encryption envelope used by WebAuthn/FIDO2 attestation and assertion flows. This package supports adding passkey login or step-up authentication to a Laravel app through the web-auth ecosystem instead of hand-rolling CBOR/COSE parsing and crypto.
  • Digital credential verification: Directly supports verifying COSE_Sign1-based credentials such as EU Digital COVID Certificate-style health passes, if that is on the roadmap or required for compliance.
  • Document and payload signing: Enables compact CBOR-based signatures for internal APIs, device messages, or document-signing features where JOSE/JWT is not the right format.
  • Build vs buy: Strong “buy/consume” signal for COSE primitives. Building COSE tag handling, algorithm identifiers, key validation, and signature structures in-house is slow and security-sensitive; this package is MIT-licensed and standards-focused.
  • Roadmap sequencing: Treat as an enabling dependency, not a customer-facing differentiator. Approve a spike/security review before committing roadmap dates.
  • Scope guardrail: Do not adopt for general JWT/JOSE needs. Use JWT libraries there; COSE is specifically for CBOR-based signing, encryption, MAC, and key management.

When to Consider This Package

  • Consider it when:
    • You need COSE_Sign1, COSE_Sign, COSE_Encrypt0, COSE_Encrypt, COSE_Mac0, or COSE_Mac support in PHP.
    • You are building WebAuthn/FIDO2/passkey flows and need low-level attestation/assertion verification; likely via a higher-level web-auth/webauthn-lib integration.
    • You need to verify EU DCC or other COSE-based digital certificates.
    • Your stack is PHP 8.1+, Composer-based, and can use OpenSSL/sodium-backed crypto.
    • Your team can perform security review, pin versions, and monitor a niche OSS dependency.
    • You need RFC 9052/9053/9864 algorithm coverage, including ECDSA, EdDSA, RSA, and HMAC families.
  • Look elsewhere when:
    • You need turnkey WebAuthn UI and flows; use a higher-level library or managed identity provider.
    • You need JWT/JWS/JWE; use a JWT/JOSE package instead.
    • You need CMS/PKCS#7, PGP, XMLDSig, or broader PKI workflows.
    • You require vendor SLA, large community support, or multiple maintainers; this package has low stars/direct dependents and is effectively single-maintainer.
    • You cannot accept cryptographic supply-chain risk or cannot run a security review.
    • You are on PHP <8.1 or cannot rely on required extensions/dependencies.

How to Pitch It (Stakeholders)

  • Executives: This is a small MIT-licensed building block that lets us add standards-based passwordless/passkey sign-in or verify COSE-based digital credentials without building cryptography ourselves. It lowers time-to-market and license cost, but it is not a standalone product differentiator. Approve only with a security review, pinned version, and fallback plan because adoption is niche.
  • Engineering: The package is standards-aligned (RFC 9052/9053/9864), PHP 8.1+, typed, tested, and covers a broad algorithm set. Use it as a low-level dependency alongside spomky-labs/cbor-php and, for WebAuthn, the higher-level web-auth stack. Main risks are low direct adoption, single-maintainer concentration, and cryptographic sensitivity; mitigate with version pinning, integration tests, release monitoring, and avoiding exposure of raw COSE APIs.
  • Product: Position it as an enabler for roadmap items such as passkeys, digital health certificate verification, or signed IoT/API payloads. Run a short spike first. If passkeys are strategic, prefer the broader web-auth stack and treat this as a transitive dependency. If the need is only JWT, do not adopt this package.
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.
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names