https://github.com/akhilsb/pqsmr-rs

Post Quantum secure asynchronous State Machine Replication

https://github.com/akhilsb/pqsmr-rs

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.0%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Post Quantum secure asynchronous State Machine Replication

Basic Info
  • Host: GitHub
  • Owner: akhilsb
  • License: apache-2.0
  • Language: Rust
  • Default Branch: master
  • Homepage:
  • Size: 2.95 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created almost 3 years ago · Last pushed about 2 years ago
Metadata Files
Readme Contributing License Code of conduct

README.md

Post Quantum Asynchronous SMR

This repository implements a post-quantum secure asynchronous SMR protocol on top of Tusk. This protocol uses lattice-based dilithium signatures in place of EdDSA signatures used by Tusk. This protocol also uses HashRand ( https://github.com/akhilsb/hashrand-rs ) as a post-quantum secure random beacon protocol to achieve liveness in asynchrony. Please note that this repository is a research prototype that has not been rigorously tested for software bugs. Please use at your own risk.

PQ-Tusk

This repository has been cloned from Narwhal.

This repo provides an implementation of PQ-Tusk. The codebase has been designed to be small, efficient, and easy to benchmark and modify. It has not been designed to run in production but uses real pq-cryptography (dilithium), networking (tokio), and storage (rocksdb).

Quick Start

The core protocols are written in Rust, but all benchmarking scripts are written in Python and run with Fabric. To deploy and benchmark a testbed of 4 nodes on your local machine, clone the repo and install the python dependencies: $ git clone https://github.com/akhilsb/pqsmr-rs.git $ cd pqsmr-rs/benchmark $ pip install -r requirements.txt You also need to install Clang (required by rocksdb) and tmux (which runs all nodes and clients in the background).

Configuring HashRand

HashRand requires configuration files of the form nodes-{i}.json and ip_file for configuring secure channels among nodes. A set of these configuration files are in the benchmark/hashrand-config directory for values $n=4,16,40,64$. Extract these files into the benchmark directory.

Finally, run a local benchmark using fabric: $ fab local This command may take a long time the first time you run it (compiling rust code in release mode may be slow) and you can customize a number of benchmark parameters in fabfile.py. When the benchmark terminates, it displays a summary of the execution similarly to the one below.

```

SUMMARY:

  • CONFIG: Faults: 0 node(s) Committee size: 4 node(s) Worker(s) per node: 1 worker(s) Collocate primary and workers: True Input rate: 50,000 tx/s Transaction size: 512 B Execution time: 19 s

Header size: 1,000 B Max header delay: 100 ms GC depth: 50 round(s) Sync retry delay: 10,000 ms Sync retry nodes: 3 node(s) batch size: 500,000 B Max batch delay: 100 ms

  • RESULTS: Consensus TPS: 46,478 tx/s Consensus BPS: 23,796,531 B/s Consensus latency: 464 ms

End-to-end TPS: 46,149 tx/s End-to-end BPS: 23,628,541 B/s

End-to-end latency: 557 ms

```

Next Steps

The next step is to read the paper Narwhal and Tusk: A DAG-based Mempool and Efficient BFT Consensus and HashRand: Efficient Asynchronous Random Beacon without Threshold Cryptographic Setup. An additional resource to better understand the Tusk consensus protocol is the paper All You Need is DAG as it describes a similar protocol.

The README file of the benchmark folder explains how to benchmark the codebase and read benchmarks' results. It also provides a step-by-step tutorial to run benchmarks on Amazon Web Services (AWS) accross multiple data centers (WAN).

License

This software is licensed as Apache 2.0.

Owner

  • Name: Akhil Bandarupalli
  • Login: akhilsb
  • Kind: user

Ph.D. student in Computer Science at Purdue University

GitHub Events

Total
Last Year

Dependencies

.github/workflows/rust.yml actions
  • actions/checkout v2 composite
Cargo.toml cargo
config/Cargo.toml cargo
consensus/Cargo.toml cargo
  • rand 0.7.3 development
  • anyhow 1
  • log 0.4.14
  • signal-hook 0
  • tokio 1.5.0
crypto/Cargo.toml cargo
network/Cargo.toml cargo
  • bincode 1.3.3 development
  • async-trait 0.1.50
  • bytes 1.0.1
  • futures 0.3.14
  • log 0.4.14
  • rand 0.7.3
  • thiserror 1.0.24
  • tokio 1.5.0
  • tokio-util 0.6.6
node/Cargo.toml cargo
primary/Cargo.toml cargo
  • rand 0.7.3 development
  • async-recursion =1.0.0
  • async-trait 0.1.50
  • bincode 1.3.1
  • bytes 1.0.1
  • ed25519-dalek 1.0.1
  • env_logger 0.7.1
  • futures 0.3.6
  • log 0.4.11
  • serde 1.0
  • thiserror 1.0.20
  • tokio 1.5.0
  • tokio-util 0.6.2
store/Cargo.toml cargo
worker/Cargo.toml cargo
  • rand 0.7.3 development
  • async-trait 0.1.50
  • bincode 1.3.3
  • bytes 1.0.1
  • ed25519-dalek 1.0.1
  • futures 0.3.14
  • log 0.4.14
  • serde 1.0
  • tokio 1.5.0
  • tokio-util 0.6.2
benchmark/requirements.txt pypi
  • boto3 ==1.16.0
  • fabric ==2.6.0
  • matplotlib ==3.3.4