[PATCH] sha3sum: New applet, v4
Lauri Kasanen
curaga at operamail.com
Thu Jan 10 18:39:32 UTC 2013
On Thu, Jan 10, 2013, at 13:35, Baruch Siach wrote:
> I just wanted to note the this SHA3 implementation is considerably slower
> than MD5 and SHA1 of Busybox, when run on my system. Sample results:
>
> # ls -l busybox
> -rwxr-xr-x 1 root root 1296692 Jan 10 11:17 busybox
>
> # time ./busybox sha3sum busybox
> 95756158fff5a75e2c3b4826fba4bf0b88d33c3157c2ae3e209aa0e76354759bc14fef25a017a1b6340aeb4e8df6201534e31b2287364f5227ae40789c3b1e97
> busybox
>
> real 0m4.085s
>
> # time ./busybox md5sum busybox
> 892a46b7d153b54f48c53815fd785d74 busybox
>
> real 0m0.099s
>
> # time ./busybox sha1sum busybox
> 20ad89fd2476b0e6dbbe637455b7db4dde506ea1 busybox
>
> real 0m0.101s
>
> Is this expected?
Yes, from two ways: SHA-3 as an algorithm is 2-3x slower than md5, and
the implementation here is optimized for size.
There exist faster implementations, but bb usually wants the smallest
size.
Another point is that on big-endian it now flips to little-endian and
back to get correct results. This is how the upstream Keccak examples
all do it, and I couldn't get correct results on BE otherwise. The speed
should be better on little-endian systems.
- Lauri
--
http://www.fastmail.fm - Does exactly what it says on the tin
More information about the busybox
mailing list