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
ES256 | Elliptic Curve Digital Signature Algorithm using the P-256/brainpoolP256r1 curve with SHA-256 |
ES384 | Elliptic Curve Digital Signature Algorithm using the P-384/brainpoolP384r1 curve with SHA-384 |
ES512 | Elliptic Curve Digital Signature Algorithm using the P-512/brainpoolP512r1 curve with SHA-512 |
EdDSA | Elliptic 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