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-next>] [day] [month] [year] [list]
Message-ID: <20250214081840.47229-1-theil.markus@gmail.com>
Date: Fri, 14 Feb 2025 09:18:38 +0100
From: Markus Theil <theil.markus@...il.com>
To: linux-crypto@...r.kernel.org
Cc: davem@...emloft.net,
	netdev@...r.kernel.org,
	akpm@...ux-foundation.org,
	Jason@...c4.com,
	Markus Theil <theil.markus@...il.com>
Subject: [PATCH 0/2] prandom: add crypto warnings and switch to new PRNG

This series builds on top of the series:
	"prandom: remove next_pseudo_random32."

With the current cryptographically safe PRNG in drivers/char/random.c
fast enough for most purposes, make annoyingly clear, that no one should
use the prandom PRNG for cryptographic purposes without known about
this.

While looking at the prandom/random32 code, I informed myself about
PRNGs and saw that currently fast PRNGs with better statistical
properties than LFSR113, which is currently used, are available.

Recent alternatives to consider are in my opinion:
* PCG: https://www.pcg-random.org
* Xoshiro: https://prng.di.unimi.it

While both seem to have good statistical properties, I recommend
to chose Xoshiro256++ here, because it seems to be even faster than
RNGs from the PCG series.

Furthermore, the authors of Xoshiro provide a small RNG named SplitMix64
for generating high quality seeds for the Xoshiro RNG. By using this in
the default way, no further seed checks or state warmup are necessary.
This simplifies the PRNG code IMHO.

Markus Theil (2):
  prandom: add usage comments for cryptography
  prandom/random32: switch to Xoshiro256++

 include/linux/prandom.h |  30 +---
 lib/random32.c          | 351 ++++++++++++++++++++--------------------
 2 files changed, 180 insertions(+), 201 deletions(-)

-- 
2.47.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ