NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: sha-512 efficiency



On Sat, 4 Jan 2020 09:53:40 -0800
Jordan Geoghegan <jordan%geoghegan.ca@localhost> wrote:

> You can test your machines hashing speed using the command: "openssl 
> speed sha256 sha512"

I wrote a small C program where I call OpenSSL SHA512 function in a
loop, on a string buffer of 1 KiB in size. But the speed test aside,
how do you test the randomness/uniqueness of hash values it generates?
It is a 64-byte binary string, so can take quite a long time before you
come across collisions.

I break up 64-byte binary string into 4-byte integer values, so that is
64 / 4 = 16 values in total. Then I look at each 4-byte value on its
own and see how many collisions it generated for a set of input data.
Not sure if this is a good way to go about it, but it is one way to
compare it to other hash functions.


Home | Main Index | Thread Index | Old Index