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: <CA+55aFyimDdpCRER_7pc30S-QLhUkt0z-Y=gD48f7t=FxxFh7g@mail.gmail.com>
Date:	Sat, 30 Jul 2011 15:35:29 -1000
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Bryan Donlan <bdonlan@...il.com>
Cc:	George Spelvin <linux@...izon.com>, linux-kernel@...r.kernel.org,
	mpm@...enic.com, tytso@....edu
Subject: Re: [PATCH 1/2] random: Add support for architectural random hooks

On Sat, Jul 30, 2011 at 3:02 PM, Bryan Donlan <bdonlan@...il.com> wrote:
>
> The problem, as you can see here, is we need to test for the existence
> of an architecture-specific HWRNG once for _every word processed_.

See the patch I sent out. Not only doesn't it check an
architecture-specific flag on x86, IT COSTS NOTHING AT ALL on other
architectures. Not per byte, not per call, not at all.

On x86, it does have the cost of:

 - basically one conditional for the whole loop (branching out if
there is no rdrand support at all). You cannot do much better than
that, except of course if you statically say "compile for an x86 that
doesn't have rdrand")

 - a per-word cost of checking CF - which you are supposed to do
anyway (ie the rdrand hardware will return with CF clear if the data
isn't reliable).

So at least on x86, I think you can get pretty close to "optimal
behavior" with my approach.

              Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ