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: <20090611133859.GC3146@osiris.boeblingen.de.ibm.com>
Date:	Thu, 11 Jun 2009 15:38:59 +0200
From:	Heiko Carstens <heiko.carstens@...ibm.com>
To:	Jarod Wilson <jarod@...hat.com>
Cc:	linux-crypto@...r.kernel.org, linux-s390@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Herbert Xu <herbert@...dor.apana.org.au>
Subject: Re: [PATCH] crypto: s390 des3 - permit weak keys unless
	REQ_WEAK_KEY set

On Mon, Jun 08, 2009 at 01:32:09PM -0400, Jarod Wilson wrote:
> Just started running fips cavs test vectors through an s390x system
> for giggles, and discovered that I missed patching s390's arch-specific
> des3 implementation w/an earlier des3 patch to permit weak keys.
> 
> This change adds the same flag tweaks as ad79cdd77fc1466e45cf923890f66bcfe7c43f12
> for s390's des3 implementation, yields expected test results now.
> 
> Signed-off-by: Jarod Wilson <jarod@...hat.com>
> 
> ---
>  arch/s390/crypto/des_s390.c |   11 ++++++-----
>  1 files changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/s390/crypto/des_s390.c b/arch/s390/crypto/des_s390.c
> index 4aba83b..2bc479a 100644
> --- a/arch/s390/crypto/des_s390.c
> +++ b/arch/s390/crypto/des_s390.c
> @@ -250,8 +250,9 @@ static int des3_128_setkey(struct crypto_tfm *tfm, const u8 *key,
>  	const u8 *temp_key = key;
>  	u32 *flags = &tfm->crt_flags;
> 
> -	if (!(memcmp(key, &key[DES_KEY_SIZE], DES_KEY_SIZE))) {
> -		*flags |= CRYPTO_TFM_RES_BAD_KEY_SCHED;
> +	if (!(memcmp(key, &key[DES_KEY_SIZE], DES_KEY_SIZE)) &&
> +	    (*flags & CRYPTO_TFM_REQ_WEAK_KEY)) {
> +		*flags |= CRYPTO_TFM_RES_WEAK_KEY;
>  		return -EINVAL;

I think this should go in via crypt-dev. Herbert?
--
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