lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 28 Jul 2015 17:17:41 -0700
From: Bill Cox <waywardgeek@...il.com>
To: "discussions@...sword-hashing.net" <discussions@...sword-hashing.net>
Subject: Re: [PHC] Argon Indexing Function

Here's the code I used to compute the distance-cubed value in TwoCats.  It
works fine:

        uint64_t v = i;
        uint64_t v2 = v*v >> 32;
        uint64_t v3 = v*v2 >> 32;
        uint32_t distance = ((1llu << 22)-1)*v3 >> 32;

I verified that it generates a very smooth histogram for memory hash sizes
up to 64 GiB.

The important thing here is to use a full 32-bit random number, and to use
64-bit arithmetic.  A 64-GiB Argon2 hash will have 2^26 blocks.  You index
these with a 32-bit number, so that gives you 6 fractional bits.

I've attached code you can run to verify the histogram.  The Argon2 team is
welcome to copy/modify it.

Bill

Content of type "text/html" skipped

View attachment "foo.c" of type "text/x-csrc" (716 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ