Giter Site home page Giter Site logo

bradwalker / ctoken Goto Github PK

View Code? Open in Web Editor NEW

This project forked from laurencelundblade/ctoken

0.0 1.0 0.0 543 KB

Encodes and decodes CWT, EAT and similar format tokens. It supports COSE format signing and verification as well as the UCCS unsigned format.

License: BSD 3-Clause "New" or "Revised" License

C 100.00%

ctoken's Introduction

ctoken

This is a library implementation of CWT, EAT, UCCS and things that are a signed CBOR Token made up of label-value pairs. It includes the CWT and EAT claims. Other claims can easily be added.

This relies on t_cose for the COSE-based signing format. t_cose can use OpenSSL crypto or PSA / mbed crypto. Other crypto can be added through the t_cose crypto adaptor layer..

This relies on QCBOR for CBOR encoding and decoding.

This code only encodes and decodes the claims in the right CBOR format. It doesn't create them as that is very dependent on the operating environment and such.

Cake Diagram

Code Size

This implementation is intended for embedded use so code size and memory use are kept small.

Standards Status

CWT is a stable IETF standard described in RFC 8392. It is not expected to change, but new claims will be added to the IANA CWT registry.

EAT is an up and coming standard in development in the RATS working group. It is in flux and parts of it are likely to change. See draft-ietf-rats-eat-08

UCCS is a CWT that is not signed. See draft-birkholz-rats-uccs-02

PSA Initial Attestation is also implemented here. It is a derivative of EAT and is also proposed as an IETF standard. It may also change. See draft-tschofenig-rats-psa-token-04

Code Status

This is a refactoring of the initial attestation code that was written for trustedfirmware.org. That code is well tested so most of this code is also well tested. However the refactoring is recent, so it is not well documented, fully organized or tested. The refactoring is mostly at the surface level, so the core complex parts should still be in good shape.

warning The interface for ctoken may change (QCBOR and t_cose are stable; their interfaces won't change).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.