From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932851AbcFBQBM (ORCPT ); Thu, 2 Jun 2016 12:01:12 -0400 Received: from mx2.suse.de ([195.135.220.15]:33505 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751455AbcFBQBJ (ORCPT ); Thu, 2 Jun 2016 12:01:09 -0400 Date: Thu, 2 Jun 2016 18:01:04 +0200 From: Marcus Meissner To: herbert@gondor.apana.org.au, davem@davemloft.net, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, smueller@chronox.de Subject: authenc methods vs FIPS in light of unencrypted associated data Message-ID: <20160602160104.GK18490@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Organization: SUSE Linux GmbH, GF: =?iso-8859-1?Q?Felix_?= =?iso-8859-1?Q?Imend=F6rffer=2C_Jane_Smithard=2C_Graham_Norton=2C_HRB_212?= =?iso-8859-1?Q?84_=28AG_N=FCrnberg=29?= User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, In February I already tagged some authenc ciphers for FIPS compatibility. I currently revisit this to get testmgr running all the tests in strict FIPS mode. The authenc() class is troublesome. There is a HASH + ENC part of this method, but you can also add associated data, which is not encrypted. (using the ctx->null cipher in crypto/authenc.c) But in FIPS mode the crypto_authenc_init_tfm does: null = crypto_get_default_null_skcipher(); which results in error, as the crypto_alloc_blkcipher("ecb(cipher_null)", 0, 0); results in failure due to "ecb(cipher_null)" not FIPS compliant. How to handle this? I think GCM also does not encrypt, just hashes, the associated data, it just does copy the content itself and does not use a virtual cipher. Ciao, Marcus