Crates.io | sloth256-189 |
lib.rs | sloth256-189 |
version | 0.4.2 |
source | src |
created_at | 2021-08-31 14:33:14.892132 |
updated_at | 2022-06-21 13:25:08.109448 |
description | Encoder/decoder for the Subspace Network Blockchain based on the SLOTH permutation |
homepage | |
repository | https://github.com/subspace/sloth256-189 |
max_upload_size | |
id | 445121 |
size | 383,873 |
This is an adaptation of SLOTH (slow-timed hash function) into a time-asymmetric permutation using a standard CBC block cipher.
This library consists of 2 major implementations:
opencl
feature to be enabled)WebAssembly (no_std
) is also supported, but llvm-ar
command needs to be available for build.rs
to succeed in that case.
CPU Implementation contains 3 flavors:
__int128
C type (modern GCC/Clang, but not MSVC)For more details, README.md under src/cpu
can be referred.
OpenCL is a universal implementation that supports AMD (ROCm), Nvidia (CUDA) and Intel GPUs, including support for multiple GPU vendors on the same machine at the same time.
Details of the OpenCL implementation can be found in mod.rs under src/opencl
.
Simply run cargo test
at the root folder
cargo test --features=opencl
for enabling opencl tests (openCL drivers must be installed on your device)Simply run cargo bench
at the root folder
cargo bench --features=opencl
for enabling opencl tests (openCL drivers must be installed on your device)Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in cc-rs by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.