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: <YeQcl1q1L4+oKHPc@owl.dominikbrodowski.net>
Date:   Sun, 16 Jan 2022 14:24:39 +0100
From:   Dominik Brodowski <linux@...inikbrodowski.net>
To:     "Jason A. Donenfeld" <Jason@...c4.com>
Cc:     linux-kernel@...r.kernel.org, tytso@....edu
Subject: Re: [PATCH 1/7] random: cleanup poolinfo abstraction

Am Thu, Jan 13, 2022 at 04:44:07PM +0100 schrieb Jason A. Donenfeld:
> Now that we're only using one polynomial, we can cleanup its
> representation into constants, instead of passing around pointers
> dynamically to select different polynomials. This improves the codegen
> and makes the code a bit more straightforward.
> 
> Signed-off-by: Jason A. Donenfeld <Jason@...c4.com>

> -} poolinfo_table[] = {
> -	/* was: x^128 + x^103 + x^76 + x^51 +x^25 + x + 1 */
> +enum poolinfo {
> +	POOL_WORDS = 128,
> +	POOL_WORDMASK = POOL_WORDS - 1,
> +	POOL_BYTES = POOL_WORDS * sizeof(u32),
> +	POOL_BITS = POOL_BYTES * 8,
> +	POOL_BITSHIFT = ilog2(POOL_WORDS) + 5,
> +	POOL_FRACBITS = POOL_WORDS << (ENTROPY_SHIFT + 5),
> +
>  	/* x^128 + x^104 + x^76 + x^51 +x^25 + x + 1 */
> -	{ S(128),	104,	76,	51,	25,	1 },
> +	POOL_TAP1 = 104,
> +	POOL_TAP2 = 76,

The only information lost seems to be that POOL_TAP1 used to be 103. But
that comment is still available in git history, so feel free to add:

	Reviewed-by: Dominik Brodowski <linux@...inikbrodowski.net>

Thanks,
	Dominik

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ