CL implementation of SHA3

Secure Hash Algorithm 3 (Keccak) Implementation in Common Lisp

The SHA3 library is a native Common Lisp implementation of the SHA-3 hashing algorithm, also known as Keccak.

The library should be portable across nearly all ANSI compliant CL implementations with specialized versions tuned for implementations that offer unboxed 64bit arithmetic, unboxed 32bit arithmetic and for implementations with efficient fixnum arithmetic, i.e. requiring fixnums that can represent (unsigned-byte 16).

Especially the 64 and 32bit implementations have been mostly optimized for SBCL and CMU CL. For those implementations, digests with a 1024 bit-rate (and 288 bit digest output) can be generated in between 30 (64bit SBCL) to around 100 (32bit CMU CL) cycles/byte on an i7-640M; whereas optimized C/assembler implementations reach around 12 to 50 cycles/byte on 64/32 bit Intel hardware. The reason for the discrepancy probably lies in missing peephole and dependency optimizations in the SBCL/CMU CL compiler backend, which I might look at in a future release.


Releases prior to release 1.0.2 had a bug that could lead to input being ignored and hence wrong message digests being calculated for input with repeated calls to sha3-update (see README file for details). Please upgrade as soon as possible, since this bug can lead to unintended collisions in generated message digests.

The implementation is licensed under an MIT/X-style license (see the file COPYING in the distribution).

The current release can be downloaded from here:

or you can get the release, sources and git repository access from the project's page at GitHub: