From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752276AbbFPCVo (ORCPT ); Mon, 15 Jun 2015 22:21:44 -0400 Received: from mail.eperm.de ([89.247.134.16]:47751 "EHLO mail.eperm.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750996AbbFPCVj (ORCPT ); Mon, 15 Jun 2015 22:21:39 -0400 From: Stephan Mueller To: Tadeusz Struk Cc: herbert@gondor.apana.org.au, linux-kernel@vger.kernel.org, keescook@chromium.org, jwboyer@redhat.com, richard@nod.at, steved@redhat.com, qat-linux@intel.com, dhowells@redhat.com, linux-crypto@vger.kernel.org, james.l.morris@oracle.com, jkosina@suse.cz, zohar@linux.vnet.ibm.com, davem@davemloft.net, vgoyal@redhat.com Subject: Re: [PATCH RFC v5 3/4] crypto: rsa: add a new rsa generic implementation Date: Tue, 16 Jun 2015 04:19:52 +0200 Message-ID: <15593683.jmSB8WjLMD@tachyon.chronox.de> User-Agent: KMail/4.14.7 (Linux/4.0.4-303.fc22.x86_64; KDE/4.14.9; x86_64; ; ) In-Reply-To: <557F809B.3060001@intel.com> References: <20150615201831.15697.57738.stgit@tstruk-mobl1> <3921303.7tkMvJ6vYE@tachyon.chronox.de> <557F809B.3060001@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Montag, 15. Juni 2015, 18:49:15 schrieb Tadeusz Struk: Hi Tadeusz, > On 06/15/2015 04:23 PM, Stephan Mueller wrote: > >> + /* In FIPS mode only allow key size minimum 2K */ > >> > >> > + if (fips_enabled && (mpi_get_size(key->n) < 256)) { > > > > Considering my previous email, shouldn't that check rather be > > > > if (fips_enabled && > > > > ((mpi_get_size(key->n) != 256) || (mpi_get_size(key->n) != 384)) > > I'm not familiar with the FIPS requirements. I checked the NIST > recommendations witch states that RSA: |n| >= 2048 is acceptable. If FIPS > allows 2K and 3K only then we need to change it. The reason for exclusive 2k/3k is the CAVS testing: there is only the ability to test 2/3k. Longer key sizes are even not allowed as per SP800-131A in favor of EC. -- Ciao Stephan