Software resources

Different software implementations of Keccak, the standard SHA-3 and SHAKE functions, Ketje, Keyak and Kravatte are available. The first place to look for an implementation is the Keccak Code Package. For reference implementations and tools for cryptanalysis, we propose KeccakTools. There are also plenty of third-party implementations in different languages, as in the non-exhaustive selection below.

For software performance figures, see this page. For older packages, see the archives.

XKCP

The eXtended Keccak Code Package or XKCP gathers different free and open-source implementations of Keccak and Xoodoo-based schemes, such as the SHAKE extendable-output functions and SHA-3 hash functions, the cSHAKE, KMAC, ParallelHash and TupleHash functions, the Ketje and Keyak authenticated encryption schemes, the fast KangarooTwelve extendable-output function, the Kravatte and Xoofff deck functions, and the Xoodyak lightweight scheme.

The XKCP is organized in a way that one can easily switch between optimized implementations of the Keccak-p or Xoodoo permutations for different platforms, without touching on the higher-level code.

Written in C and in assembly, the XKCP also contains some standalone implementations in Python and Rust.

KeccakTools

KeccakTools is a set of C++ classes that can help analyze Keccak and the related variants.

KeccakTools contains:

  • the reference implementation of the Keccak-p permutations, and of most of the Keccak instances and variants, including Ketje, Keyak and Kravatte;
  • the generation of optimized code for the round function of Keccak-p;
  • the generation of mathematical equations underlying the operations in Keccak-p;
  • a plethora of tools to analyze Keccak-p under differential and linear cryptanalysis, as used to prove lower bounds on the weight of trails.

Third-party implementations

First, this form lets you find implementations that have been validated by NIST as SHA-3.

Then, the following open-source libraries integrate Keccak, SHA-3, SHAKE and/or other functions.

Some blockchain-based projects use Keccak and therefore contain their implementation, e.g.,

Finally, here is a non-exhaustive list of other implementations that can be found on the web. (If you feel your implementation should be in that list, do not hesitate to drop us an email.)

Name Author(s) Language(s) Scope
Xoocycle Sean B. Palmer C Xoodoo, Xoodyak
charm Frank Denis C Xoodoo
fehashmac Harald von Fellenberg C Keccak, SHA-3, SHAKE, KMAC
keccak-tiny David Leon Gil C A tiny implementation of SHA-3, SHAKE, Keccak, and sha3sum
libkeccak and sha3sum Mattias Andrée C Keccak, SHA-3, SHAKE
sha3sum and then some Jim McDevitt C Keccak, SHA-3, SHAKE and a highly parameterizable utility program
tiny_sha3 Markku-Juhani O. Saarinen C Very small, readable implementation of SHA-3 and SHAKE
Post-quantum crypto library for the ARM Cortex-M4 (pqm4) crystalsnetworkdev C SHA-3, SHAKE, cSHAKE
libmdigest Jörg Schilling C SHA-3
digestpp kerukuro C++ Keccak, SHA-3, SHAKE, cSHAKE, KMAC, KangarooTwelve
Keccak on GPU Ling Song, Guohong Liao and Jian Guo CUDA As part of their paper in CRYPTO 2017 to find collisions in reduced-round Keccak
ccminer Tanguy Pruvot CUDA Keccak
New SHA-3 permutation kernel Eric Grange Delphi Keccak
Delphi Encryption Compendium Markus Humm Delphi SHA-3
elm-keccak prozacchiwawa elm Keccak, SHA-3
GoKangarooTwelve David Wong Go KangarooTwelve
StrobeGo David Wong Go The Strobe protocol (Keccak-f[1600])
Xoodoo/Xoodyak Calvin McCoy Go Xoodoo, Xoodyak
Cryptography Bobulous Java Keccak, SHA-3, SHAKE
keccakj Amund Elstad Java SHA-3, SHAKE, Lake Keyak
noble-hashes Paul Miller JavaScript Keccak, SHA-3, cSHAKE, KMAC, TupleHash, ParalllelHash, KangarooTwelve, KeccakPRG
js-sha3 Chen, Yi-Cyuan JavaScript Keccak, SHA-3, SHAKE, cSHAKE, KMAC
jsSHA Brian Turek JavaScript SHA-3, SHAKE, cSHAKE, KMAC
cryptocoinjs/keccak cryptocoinjs JavaScript Keccak, SHA-3, SHAKE
node-sha3 Phusion B.V. JavaScript Keccak, SHA-3
hashcat hashcat OpenCL Keccak, SHA-3
HashLib4Pascal Ugochukwu Mmaduekwe Object Pascal Keccak, SHA-3, SHAKE, cSHAKE, KMAC
Digest::SHA3 Mark Shelor Perl SHA-3, SHAKE
PyCryptodome Helder Eijs Python Keccak, SHA-3, SHAKE
Kravatte Achouffe Cipher Suite in Python/NumPy Calvin McCoy Python Kravatte
SHA-3 and SHAKE in MPyC Berry Schoenmakers Python Multiparty computation of SHA-3 and SHAKE
digest-kangarootwelve konsolebox Ruby KangarooTwelve
SleepingKangaroo12 Sarun Rattanasiri Ruby Ruby bindings for KangarooTwelve
tiny-keccak Marek Kotewicz Rust Keccak, SHA-3, SHAKE, KangarooTwelve
SP800-185 in Rust quininer Rust cSHAKE, KMAC, TupleHash, ParallelHash
RustCrypto/hashes and RustCrypto/sponges RustCrypto Rust Keccak, SHA-3, SHAKE, KangarooTwelve, TurboSHAKE
Xoodyak for Rust Frank Denis Rust Xoodyak
kangarootwelve, turboshake, xoodyak and xoofff Anjan Roy Rust KangarooTwelve, TurboSHAKE, Xoodyak, Xoofff
libkeccak and ksum Daniel King SPARK/Ada Keccak, SHA-3, SHAKE, cSHAKE, KMAC, KangarooTwelve, TupleHash, ParallelHash, Ketje
mipher Marco Paland TypeScript Keccak, SHA-3, SHAKE