Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@mattrglobal/cose

Package Overview
Dependencies
Maintainers
5
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mattrglobal/cose

An implementation of RFC8152

latest
Source
npmnpm
Version
5.1.0
Version published
Maintainers
5
Created
Source

CBOR Object Signing and Encryption

This repository is home to an incomplete implementation of RFC 8152 written in Typescript.

Initialising submodules

This project uses a Git submodule from the repository at github.com/cose-wg/Examples.git. That repository contains test cases. So you will need to pull them down for tests to run. To activate the submodule, run the following:

git submodule init
git submodule update

Signing

The following algorithms are supported for COSE_Sign1

Signing AlgorithmDescription
ES256Elliptic Curve Digital Signature Algorithm using the P-256/brainpoolP256r1 curve with SHA-256
ES384Elliptic Curve Digital Signature Algorithm using the P-384/brainpoolP384r1 curve with SHA-384
ES512Elliptic Curve Digital Signature Algorithm using the P-512/brainpoolP512r1 curve with SHA-512
EdDSAElliptic Curve Digital Signature Algorithm using the Ed25519/Ed448 curve with SHA-512

CBOR Libraries

Node CBOR

Versions <= 4.x use the cbor package to CBOR encode which has different mappings from the cbor2 package.

CBOR2

⚠️ Breaking Changes in v5.x

Versions >= 5.x use the cbor2 package to encode. Since this library does not Tag some of the values as per RFC-8746, a tagValue utility function is provided.

Licensing

See here for licence information

FAQs

Package last updated on 14 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts