Skip to content

ivarprudnikov/cose-and-receipt-playground

Repository files navigation

Cose signing and countersigning playground

Build Go Report Card

API/website: https://playground-cose-eastus-api.azurewebsites.net

Development

Prerequisites

Commands

  • Testing
    • Run unit tests: go test -v ./...
    • Run functional end-to-end (e2e) tests, see readme
  • Running locally
    • Compile and execute the server binary: go run .
    • Or, run the server in an Azure function environment locally: ./scripts/run.sh
  • Deployment

About

A simple Go application that implements a COSE signing and countersigning. Works as a REST API but also as a basic website with the HTML forms.

It gets deployed as a standalone Azure function app, but can be run locally as well.

Signatures and countersignatures

Main RFCs used in the playground:

SCITT draft defines some expectatins about the COSE signatures which the code uses as well, i.e. CWT header, but this playground does not implement required countersignature format https://www.ietf.org/archive/id/draft-ietf-scitt-architecture-11.html

Public key distribution

This playground uses did:web issuer string and the corresponding public key distribution https://w3c-ccg.github.io/did-method-web/ although signing keys are short lived and are practical for the immediate validation only.

Alternatively you can use did:x509 issuer which will also have x5c chain added, but the suppot is limited, e.g. not all policies will work https://github.com/microsoft/did-x509 .

Azure functions

About

A place to try out cose signatures and their countersignatures (receipts).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published