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] [day] [month] [year] [list]
Date:	Thu, 17 Jul 2008 11:43:33 -0700
From:	Joe Perches <joe@...ches.com>
To:	Neil Horman <nhorman@...driver.com>
Cc:	linux-kernel@...r.kernel.org, linux-crypto@...r.kernel.org,
	davem@...emloft.net, herbert@...dor.apana.org.au
Subject: Re: [PATCH] crypto: Cleaning some more minor nits in prng

On Thu, 2008-07-17 at 14:30 -0400, Neil Horman wrote:
> diff --git a/crypto/prng.c b/crypto/prng.c
> index 9e2d277..0b1831e 100644
>  {
>  	int ret;
> @@ -313,6 +313,9 @@ int reset_prng_context(struct prng_context *ctx,
>  
>  	prng_key = (key != NULL) ? key : (unsigned char *)DEFAULT_PRNG_KEY;
>  
> +	if (!key)
> +		klen = DEFAULT_PRNG_KSZ;
> +
>  	if (V)
>  		memcpy(ctx->V, V, DEFAULT_BLK_SZ);
>  	else

Perhaps more readable as:

	if (key)
		prng_key = key;
	else {
		prng_key = DEFAULT_PRNG_KEY;		
		klen = DEFAULT_PRNG_KSZ;
	}


--
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