On 10/29/2015 04:26 PM, Christopher M. Fuhrman wrote:
> On Wed, 28 Oct 2015 at 5:37pm, Eduard wrote:
> 
> What kind of speed hit would using the BLAKE2b algorithm on 32-bit
> machines such as i386, vax, or m68k?  Yes, there's the BLAKE2s
> algorithm for 8-32 bit architectures but that produces different
> hashes than BLAKE2b.  Is it even possible to use BLAKE2b on a 32-bit
> CPU?

Yes it is possible, and not much slower either! Here's what I get on my
Intel L2300 CPU (which is 32-bit only):

blake2s-256
268435456 bytes (268 MB) copied, 3.8387 s, 69.9 MB/s
blake2b-512
268435456 bytes (268 MB) copied, 3.97249 s, 67.6 MB/s
sha1
268435456 bytes (268 MB) copied, 2.23538 s, 120 MB/s
sha2-256
268435456 bytes (268 MB) copied, 5.03352 s, 53.3 MB/s
sha2-512
268435456 bytes (268 MB) copied, 19.9417 s, 13.5 MB/s

And here's what I get on a 64-bit CPU (Intel i5-3470):

blake2s-256
1073741824 bytes (1.1 GB) copied, 2.09602 s, 512 MB/s
blake2b-512
1073741824 bytes (1.1 GB) copied, 1.6206 s, 663 MB/s
sha1
1073741824 bytes (1.1 GB) copied, 2.35279 s, 456 MB/s
sha2-256
1073741824 bytes (1.1 GB) copied, 5.14392 s, 209 MB/s
sha2-512
1073741824 bytes (1.1 GB) copied, 3.47958 s, 309 MB/s

I also remember trying this on an Allwinner A10 ARM (32 bit) CPU, and
the NEON-optimized version was actually faster than SHA1.

Best,
Eduard


Script:
#!/bin/sh
do_hash() { echo "$1"; shift; { dd if=/dev/zero bs=16M count=$n | "$@"
/dev/stdin >/dev/null; } 2>&1 | grep 'copied'; }
n=16
do_hash blake2s-256 ./b2sum -a blake2s
do_hash blake2b-512 ./b2sum -a blake2b
do_hash sha1 sha1sum
do_hash sha2-256 sha256sum
do_hash sha2-512 sha512sum

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to