#keccak #permutation #function #1600 #400 #200 #800

no-std keccakf

An implementation of the keccak-F[1600,800,400,200]

2 unstable releases

0.2.1 Nov 25, 2022
0.2.0 Nov 25, 2022
0.1.3 May 15, 2019

#1167 in Cryptography

CC0 license

14KB
331 lines

keccakf

An implementation of the keccak-F[1600,800,400,200].

Usage

Add this to your Cargo.toml:

[dependencies]
keccakf = "0.2"

choose which function you want to use:

use keccakf::{Keccak1600State, Permutation};
let state = Keccak1600State::default();
state.permute();

Changelog

  • 0.2.1: update README
  • 0.2.0: refactor code.
  • 0.1.3: Add bits and nbytes in parameter. Change trait Permutable to Permutation.

lib.rs:

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. Use macro to generate functions Keccak-F[] with different parameters.

Usage

Add this to your Cargo.toml:

[dependencies]
keccakf = "0.1.2"

then you can use this code:

use keccakf::{Keccak1600State, Permutation};

let mut state = Keccak1600State::default();
state.permute();

Original implemntation in Rust: tiny-keccak

Test vectors: XKCP

Dependencies

~10KB