8000 GitHub - nategraf/rkvc: A library for building anonymous credentials from algebraic MACs
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

nategraf/rkvc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
A58D
 
 
 
 
 
 

Repository files navigation

rkvc

rkvc is a library for building anonymous credentials from algebraic MACs, based on the techniques described in Revisiting Keyed-Verification Anonymous Credentials, and in prior works1.

Project Structure

The project consists of several components:

  • src/: Core library implementation

    • attributes.rs: Attributes system for credential data
    • cmz.rs: CMZ credential scheme implementation
    • hash.rs: Cryptographic hashing utilities
    • pederson.rs: Pedersen commitment scheme
    • range.rs: Range proofs with Bulletproofs
    • zkp.rs: Zero-knowledge proof primitives
  • derive/: Procedural macros for attribute definitions

  • examples/: Sample implementations demonstrating library usage

Getting Started

Prerequisites

  • Rust 1.85 or later
  • cargo expand is required for macro tests
    • cargo install --locked cargo-expand

Building

cargo build

Running Tests

cargo test --workspace

Updating macro tests

When developing the macro implementation, test vectors can be updated with the following command.

TRYBUILD=overwrite MACROTEST=overwrite cargo test -p rkvc-derive

Examine the changes and check commit them with git if they are as expected.

Development Commands

# Code linting
cargo clippy

# Code formatting
cargo fmt

Features

  • default: Includes derive feature
  • derive: Enables derive macros for attributes
  • std: Standard library support (disabled by default for no_std compatibility)

Examples

Several examples are provided to demonstrate library usage:

  • expiration.rs: A simple credential with an ID and expiration time.
  • lox.rs: Example implementation of Lox.
  • ooni.rs: Example implementation targeting the use case of OONI.

Run examples with:

cargo run --manifest-path examples/Cargo.toml --bin ${EXAMPLE:?}

Footnotes

  1. TODO: List prior works e.g. CMZ'14 and BBDT'16

About

A library for building anonymous credentials from algebraic MACs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0