Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp392783pxu; Tue, 1 Dec 2020 14:04:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJyaVtw7YqoJKckTbl61upaKmmC5acw6NsJEWaib2Fsc+aSsHiDZeaKG2dMqqymYXz09fhx5 X-Received: by 2002:a17:907:2116:: with SMTP id qn22mr5059868ejb.483.1606860282814; Tue, 01 Dec 2020 14:04:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606860282; cv=none; d=google.com; s=arc-20160816; b=LqoXtBLy5/IBzNfpqKsRUu8GTfoaS23JcsKg4OslDQAghGOl4Mrxyqu6KpSow54fS3 6ujOsr+igOfowBvml+ZUKhrME86KOIwWZYjfh6blwRBa8ks9zO52lJd6jcWi6nyXEJm1 Xyh8H3TDcJB1JD0tlhIH1zY9ruhNtpIi3aqCuPZR1i+2q2A+/ub+Ponze4Vg8QBKvrqp vpbR289kdID1rF8eFWNirCwpiIWXfcmsRznp5daz+VyfTfRcH7/idvsHl8+BPUk41U7S ww7KwWlAWON7jqlAeXu+F9OPTY150EU9YSQZqRpbWqIDcMliEithVYqVYQnah6YkDJBh PCyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=US/0Y5Ux5F/FDiKLqFBuXVK8s0kor+IVnyDhcfpsYIA=; b=XQpMggjKcHMiEXXtGD9OShqoWm2vrZ+S6FqJ2YCw9UzkKCNcYeOBFlULTH6oCMCmgf C04vF5K8ybuuAEsWCItujI2Dd6yqRI+HOMHLnEkUQU8hhPfHYXIXoQNSQFgwV/80xpT4 Kfik3r+Rb6bkiX4ORDBHYyFr+bcT/u2nCO4QjyU2StqDQ09vhYGasnqp4qkpFAdPxbI3 eE5kyA8UcQ5XCgkVBIzw3lovh3wG+2giRtNOPfvgnbPi359PRGQExkcQBA5IHc5A8eGd cbGsXww65JDUk7M7xq2rgSWPrIOQaIylZRavY+sOAr4DCO+zaDkrJthC3nRJyj9e4OoE d75w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cL98H4cx; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t14si865786eds.144.2020.12.01.14.04.19; Tue, 01 Dec 2020 14:04:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cL98H4cx; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388514AbgLAWC5 (ORCPT + 99 others); Tue, 1 Dec 2020 17:02:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:59910 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404317AbgLAWCv (ORCPT ); Tue, 1 Dec 2020 17:02:51 -0500 Received: from mail-oi1-f171.google.com (mail-oi1-f171.google.com [209.85.167.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DD39C2085B for ; Tue, 1 Dec 2020 22:02:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606860130; bh=2318cJi0XM6B1EqVKiFaQn4nvxQOBf6NLR3H7/R83Ik=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=cL98H4cxcSkmBUB6m1jvTsL4gAshvkrvx0F8v1a/mE8rDj5qItNC6fSp7ghUyK5P8 pL9l3xYYsB3mY8b0pKtRuV87eUpzSICrFFfEICW9VZATZxQjiXFl2AB/AMi1Ay5BYd lxKbX4XOYR0s0+5w0zC1W1F8Ku/rSEuakxExfiTs= Received: by mail-oi1-f171.google.com with SMTP id f11so3496623oij.6 for ; Tue, 01 Dec 2020 14:02:09 -0800 (PST) X-Gm-Message-State: AOAM533XukJdsrjQc9J+BjSmSf7t0KxB3WBKBJrgslILH7gZTRhIjzEp eleYx9d1qmWElkmGMmDWnblnun0xlVPZI0zb1BA= X-Received: by 2002:aca:dd0b:: with SMTP id u11mr3237948oig.47.1606860129096; Tue, 01 Dec 2020 14:02:09 -0800 (PST) MIME-Version: 1.0 References: <20201201194556.5220-1-ardb@kernel.org> <20201201215722.GA31941@gondor.apana.org.au> In-Reply-To: <20201201215722.GA31941@gondor.apana.org.au> From: Ard Biesheuvel Date: Tue, 1 Dec 2020 23:01:57 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] crypto: aesni - add ccm(aes) algorithm implementation To: Herbert Xu Cc: Linux Crypto Mailing List , Ben Greear , Steve deRosier Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Tue, 1 Dec 2020 at 22:57, Herbert Xu wrote: > > On Tue, Dec 01, 2020 at 08:45:56PM +0100, Ard Biesheuvel wrote: > > Add ccm(aes) implementation from linux-wireless mailing list (see > > http://permalink.gmane.org/gmane.linux.kernel.wireless.general/126679). > > > > This eliminates FPU context store/restore overhead existing in more > > general ccm_base(ctr(aes-aesni),aes-aesni) case in MAC calculation. > > > > Suggested-by: Ben Greear > > Co-developed-by: Steve deRosier > > Signed-off-by: Steve deRosier > > Signed-off-by: Ard Biesheuvel > > --- > > v2: avoid the SIMD helper, as it produces an CRYPTO_ALG_ASYNC aead, which > > is not usable by the 802.11 ccmp driver > > Sorry, but this is not the way to go. Please fix wireless to > use the async interface instead. > This is not the first time this has come up. The point is that CCMP in the wireless stack is not used in 99% of the cases, given that any wifi hardware built in the last ~10 years can do it in hardware. Only in exceptional cases, such as Ben's, is there a need for exercising this interface. Also, care to explain why we have synchronous AEADs in the first place if they are not supposed to be used?