Skip to content

peitalin/FSwA-threshold

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fswa_threshold

This repository is a Rust implementation scaffold of the threshold Fiat-Shamir with Aborts (FSwA) protocol from "Finally! A Compact Lattice-Based Threshold Signature" (Pino and Niot, 2025).

Warning: This codebase has not been security audited. Do not use it in production without a careful review and your own risk assessment.

Directory structure:

  • fswa_threshold/: core library crate, protocol logic, optional TCP transport, examples, and integration tests.
  • docs/: implementation notes, audit notes, and generated audit artifacts.
  • scripts/: Python audit/cross-check helpers.
  • pino_and_niot_2025.pdf: local copy of the reference paper.

Documentation entry point:

  • docs/index.md

Running tests

  • Default unit tests + in-memory protocol E2E (Table 4 / uniform): cargo test -p fswa_threshold
  • TCP client <-> server E2E test: cargo test -p fswa_threshold --features net-tokio
  • Gaussian (Table 3) signing tests: cargo test -p fswa_threshold --features gaussian
  • Gaussian + bounded-time/CT-ish sampler helpers: cargo test -p fswa_threshold --features gaussian-ct

Running examples

  • Local protocol simulation (no networking): cargo run -p fswa_threshold --example local_sim
  • Local benchmark harness: cargo run -p fswa_threshold --example bench_local
  • TCP 2-party demo: cargo run -p fswa_threshold --example tcp_2p --features net-tokio
  • Emit deterministic vectors for Python cross-checks: cargo run -p fswa_threshold --example py_audit_vectors --features gaussian-ct

Python audit tooling

  • Install dependencies: python3 -m pip install -r scripts/requirements.txt
  • Continuous epsilon approximation: python3 scripts/pino_niot_epsilon.py
  • Discrete epsilon computation: python3 scripts/pino_niot_epsilon_discrete.py
  • Rust/Python cross-check: python3 scripts/verify_rust_vs_python.py

Artifacts are written to docs/audit/.

About

Lattice-based threshold signing using Fiat Shamir with Aborts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors