[−][src]Crate keccakf
An implementation of the keccak-F[1600,800,400,200].
All Keccak-F[]
permutation is fully unrolled; it's nearly as fast
as the Keccak team's optimized permutation. I use macro
to generate
functions Keccak-F[]
with different parameters.
Building
cargo build
Usage
Add this to your Cargo.toml
:
[dependencies]
keccakf = "0.1.2"
and this to your crate root:
extern crate keccakf;
then you can use this code:
use keccakf::KeccakF1600State; // Optional use keccakf::Permutation; // ... let mut state = [0u64;25]; state.permute();
Original implemntation in Rust: tiny-keccak
Test vectors: XKCP
Add macro and more parameters: tiannian (dtiannian@aliyun.com, dtiannian@gmail.com)
License: CC0
Structs
PermutableParameter | Permutation's parameter |
Traits
Permutation | Trait for Permutation |
Functions
keccakf200 | keccak-f[200] |
keccakf400 | keccak-f[400] |
keccakf800 | keccak-f[800] |
keccakf1600 | keccak-f[1600] |
Type Definitions
KeccakF200State | Type of |
KeccakF400State | Type of |
KeccakF800State | Type of |
KeccakF1600State | Type of |