Crates.io | rust-aes-proofs |
lib.rs | rust-aes-proofs |
version | 0.2.0 |
source | src |
created_at | 2020-05-17 23:17:34.717413 |
updated_at | 2020-05-24 23:31:19.508872 |
description | Various AES-based Proof-of-Replication and Proof-of-Time implementations and benchmarks |
homepage | |
repository | https://github.com/subspace/rust-aes-proofs |
max_upload_size | |
id | 242825 |
size | 264,940 |
Various AES-based Proof-of-Replication and Proof-of-Time implementations and benchmarks.
Source code is written in Rust, so first of all you need to have Rust toolchain installed, the best way is to follow instructions for your platform on rustup.rs.
Besides Rust compiler itself you'll need following components installed on your machine to run OpenCL-based implementation:
On Ubuntu 18.04+ for AMD GPUs they can be installed like this:
sudo apt-get install gcc ocl-icd-opencl-dev mesa-opencl-icd
On Ubuntu 18.04+ for Intel GPU they can be installed like this:
sudo apt-get install gcc ocl-icd-opencl-dev beignet-opencl-icd
It is also possible to use Oclgrind to run OpenCL implementation on CPU in software.
On Ubuntu 18.04+ Oclgrind can be installed like this:
sudo apt-get install oclgrind
TL;DR:
cargo test
cargo bench
For tests built-in Rust functionality is used, so this chapter of Rust book will help you.
Running only subset of tests can be achieved easily like this:
cargo test -- por::aes_ni # Only run Proof-of-Replication tests and only AES-NI implementation
Look at src/por
and src/pot
subdirectories for available implementations.
For benchmarks Criterion is used, so you can use its documentation.
Since benchmarks may take a long time to run, you may want to only run subset of them, which can be conveniently achieved like this:
cargo bench --bench por -- OpenCL # Only run Proof-of-Replication benchmarks and only OpenCL implementation
Look at benches
subdirectory for available benchmarks and implementations.