Git Product home page Git Product logo

libtrusttoken's Introduction

libtrusttoken

libtrusttoken is a basic library to expose Private State Token functionality to issuers as part of the Chrome Origin Trial. A non-production demo is shown in demo/.

Project links:

Versions

Currently libtrusttoken supports one version of the Private State Token API:

  1. v2_allpublic - A variant that allows the use of 6 public metadata values.

Building

Using Ninja (note the 'N' is capitalized in the cmake invocation):

mkdir build
cd build
cmake -GNinja ..
ninja

Using Make (does not work on Windows):

mkdir build
cd build
cmake ..
make

General API

To use this API, the caller should construct a PrivateStateTokenIssuer with the appropriate configuration (Currently the issuer version and the max batchsize that is supported).

The object should then be initialized with the keys that this issuer supports using AddKey (these keys are generated using GenerateKey). The number of keys allowed is based on the version of the protocol being used (6 keys for the v2_allpublic and 3 keys for v2_privatemetadata).

GetCommitment can be used to construct a JSON dictionary that acts as a suitable key commitment for the Private State Token protocol. The commitment_id should be an monotonically increasing ID as keys are rotated out and new commitments are generated. The resulting JSON dictionary should be served at some public endpoint and is part of the Issuer registration process for various UAs (browsers).

On receiving a Private State Token issuance request, the issuer should extract the Sec-Private-State-Token header and pass it into Issue, along with the metadata values that should be encoded in the tokens and the maximum number of tokens to issue. The resulting string should be included in the Sec-Private-State-Token header response.

On receiving a Private State Token redemption request, the issuer should extract the Sec-Private-State-Token header and pass it into Redeem. The outputs should be used to construct a redemption response which should be included in the Sec-Private-State-Token header. The Private State Token API describes one potential redemption record format.

libtrusttoken's People

Contributors

dvorak42 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libtrusttoken's Issues

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.