-
Compact Implementations of Shabal
Posted on October 12th, 2010 No commentsCompact implementations of hash functions promote performance, by reducing pressure on L1 cache, and allow for easier integration on platforms with stringent constraints on code size. We present here some implementations of the Shabal hash function, optimized for code compactness. Two portable C implementations are provided, as well as specialized implementations in assembly for several architectures (32-bit and 64-bit x86, 32-bit PowerPC, big-endian and little-endian ARM, big-endian and little-endian 32-bit MIPS, and AVR8 microcontrollers).
All specialized implementations fit in less than one kilobyte of code, down to less than half a kilobyte on some platforms (e.g. 404 bytes for ARM-Thumb, 450 bytes on 32-bit x86). They nonetheless provide at least 60% of the speed achieved by optimized, unrolled C code on the same platforms. Moreover, these implementations all follow coding rules which make them immediately applicable to any application: the API is reentrant and thread-safe, it supports streaming operations, and the code is position-independent (it can be used in DLL). Each implementation simultaneously supports Shabal for all the 16 defined output sizes (all multiples of 32, from 32 to 512 bits), which includes the four standard SHA-3 output sizes (224, 256, 384 and 512 bits).
Download: Compact Implementations of Shabal (273)
Compact implementations of hash functions promote performance, by
reducing pressure on L1 cache, and allow for easier integration on
platforms with stringent constraints on code size. We present here some
implementations of the Shabal hash function, optimized for code
compactness. Two portable C implementations are provided, as well as
specialized implementations in assembly for several architectures
(32-bit and 64-bit x86, 32-bit PowerPC, big-endian and little-endian
ARM, big-endian and little-endian 32-bit MIPS, and AVR8
microcontrollers).
All specialized implementations fit in less than one kilobyte of code,
down to less than half a kilobyte on some platforms (e.g. 404 bytes for
ARM-Thumb, 450 bytes on 32-bit x86). They nonetheless provide at least
60% of the speed achieved by optimized, unrolled C code on the same
platforms. Moreover, these implementations all follow coding rules which
make them immediately applicable to any application: the API is
reentrant and thread-safe, it supports streaming operations, and the
code is position-independent (it can be used in DLL). Each
implementation simultaneously supports Shabal for all the 16 defined
output sizes (all multiples of 32, from 32 to 512 bits), which includes
the four standard SHA-3 output sizes (224, 256, 384 and 512 bits).


Recent Comments