Skip to content

humuhimi/pqc-vc-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Post-Quantum Cryptography for Verifiable Credentials

Paper License Rust

Implementation and benchmarking code for the research paper:

"Post-Quantum Cryptography for Verifiable Credentials: Comprehensive Performance Evaluation Including Selective Disclosure" Masayoshi Arakawa, 2025 TechRxiv: https://www.techrxiv.org/users/973090/articles/1346363

Overview

Rust implementation of W3C Verifiable Credentials with post-quantum cryptography:

  • 15 cryptographic algorithms - ML-DSA (FIPS 204), Falcon, SPHINCS+, Ed25519, P-256, secp256k1, RSA-2048
  • SD-JWT selective disclosure - IETF draft-22 compliant
  • W3C VC Data Model 2.0 compatible
  • Comprehensive benchmarks - Statistical analysis with 1000+ iterations

Quick Start

Prerequisites

  • Rust 1.70 or later
  • liboqs 0.11.0+ (for post-quantum algorithms)
  • OpenSSL 3.x (for classical cryptography)

Installation

macOS (Apple Silicon)

# Install dependencies
brew install liboqs openssl@3

# Set environment variables (add to ~/.zshrc or ~/.bashrc)
export OPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl@3
export OPENSSL_LIB_DIR=/opt/homebrew/opt/openssl@3/lib
export OPENSSL_INCLUDE_DIR=/opt/homebrew/opt/openssl@3/include
export PKG_CONFIG_PATH=/opt/homebrew/lib/pkgconfig:$PKG_CONFIG_PATH
export LIBRARY_PATH=/opt/homebrew/lib:$LIBRARY_PATH
export LD_LIBRARY_PATH=/opt/homebrew/lib:$LD_LIBRARY_PATH

# Clone and build
git clone https://github.com/humuhimi/pqc-vc-rust
cd pqc-vc-rust
cargo build --release

Ubuntu/Debian

# Install dependencies
sudo apt update
sudo apt install -y cmake gcc ninja-build libssl-dev

# Build and install liboqs
git clone --depth 1 --branch 0.11.0 https://github.com/open-quantum-safe/liboqs.git
cd liboqs && mkdir build && cd build
cmake -GNinja -DCMAKE_INSTALL_PREFIX=/usr/local ..
ninja && sudo ninja install
cd ../..

# Clone and build
git clone https://github.com/humuhimi/pqc-vc-rust
cd pqc-vc-rust
cargo build --release

Running Benchmarks

# Run with default 1000 iterations
cargo run --example benchmark_runner --release

# Quick test with 100 iterations
cargo run --example benchmark_runner --release -- 100

# Results saved to: benchmark_results.csv

Supported Algorithms

Post-Quantum (NIST):

  • ML-DSA-44, ML-DSA-65, ML-DSA-87 (FIPS 204, lattice-based)
  • Falcon-512, Falcon-1024 (lattice-based)
  • SPHINCS+-SHAKE-128s/f, 192s/f, 256s/f (hash-based)

Classical (Baseline):

  • Ed25519, P-256, secp256k1, RSA-2048

Results

Benchmark results are available in results/ubuntu_benchimark_results.csv.

Detailed analysis and findings are presented in the research paper.

Citation

@article{arakawa2025pqc,
  title={Post-Quantum Cryptography for Verifiable Credentials: Comprehensive Performance Evaluation Including Selective Disclosure},
  author={Arakawa, Masayoshi},
  journal={TechRxiv},
  year={2025},
  url={https://www.techrxiv.org/users/973090/articles/1346363}
}

License

MIT License - Copyright (c) 2025 Masayoshi Arakawa

Notes

⚠️ Research code for academic purposes only. Not intended for production use.

For issues and questions, please use GitHub Issues.

About

Rust implementation and benchmarks for post-quantum verifiable credentials, SD-JWT selective disclosure, and W3C VC Data Model.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages