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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHmME9pNhu2hgFAcEv22nRU5S4qd3oMVNV08syYsAbDOJRQuhA@mail.gmail.com>
Date:   Sat, 21 Jan 2017 01:13:33 +0100
From:   "Jason A. Donenfeld" <Jason@...c4.com>
To:     "Theodore Ts'o" <tytso@....edu>,
        "Jason A. Donenfeld" <Jason@...c4.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Hannes Frederic Sowa <hannes@...essinduktion.org>,
        Andy Lutomirski <luto@...capital.net>
Subject: Re: [PATCH 1/2] random: use chacha20 for get_random_int/long

Hi Ted,

On Sat, Jan 21, 2017 at 1:10 AM, Theodore Ts'o <tytso@....edu> wrote:
> Why would there be an unaligned access?  What I was suggesting was an
> array of u32, and we just do two separate u32 accesses with a shift in
> the case of get_random_u64.  There's nothing illegal about that.
>
>     u64 retval;
>
>     retval = (array[pointer] << 32) + array[pointer+1];
>     pointer += 2;

Oh, I see now. I thought you were suggesting casting u32* to u64*.

Yea, this approach works. It's slower than my code, but it gets the job done.

Unless I hear back from you saying "keep with your approach instead of
this one", I'll submit a v2 to you containing this approach instead.

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ