Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp869718ybg; Tue, 28 Jul 2020 23:07:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVBmeMgMtoLgoVfVdBAuVy1472ckaJ5vFAThqsNTFZl9Q/DejWKjfGyoMJrb5cdtYfEeQU X-Received: by 2002:a50:cdd8:: with SMTP id h24mr25953598edj.241.1596002863222; Tue, 28 Jul 2020 23:07:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596002863; cv=none; d=google.com; s=arc-20160816; b=JyTczCUxxm8BJG5G+BQ79cWm5hU2FNKq/Oa++eIkPqC6yz1w5Skn3DY7C5BrwqCqf3 e5eMceef1hZ7fcGnZRBDRm9+4C1XUcpIKX9Is9EGdaPFhzFKv/Uk5RpoiRjkkeDLzlDZ XDYGtgj37sl4lT02MiZwuV8IU1PyU0noyCxxNWd/9olPwa42wC9fY19sgsfsbSMcu8QZ t/mOFGwxhKwH9tN84e2ZRs/M1fN8FcqKvVCiziP/po1dacip9X/M38fQwAK5dJSkrGZz 0qVBFV6LiMu1jRUHKDYX2mXaqqUyVERPRsnUje+E3GZYi2lYdaCMWuaw+ky2JOnXA5Kn mxQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=MTrNtqLPrawvPE+KI3qIeD7tT06oMrCKwqSvLNYUIT0=; b=0srZnSzFkmNI0phpF/OP26PC2ZRVp3zrqn6OpI9rCYHGo4aJvYPlhBEG1ELM74YTCG Io3qnj1aX0NiRn78CLMi32nuUDNjox6JjlL8kKVHgJHDJWJTinfy081M32uAKKCv+w4L 2g7DuLJvup1SFoz3b9gdtjEeIc8CpyLNe+MpFHL+phIXN8TuVVD3OVX+jSq9LgpxXT79 OsTsguKc4UV6Fw5QDqNBIhbNhalNKT2UBO9gFOdLkHsc40lyuWkPUZ0qNpsdm1bfb8To eCO6/bxaNSvWx0nxFhFUJDWHFjleUielJIbOgDJA81oi2BwR2ZUsqOLqYObYDERo66tJ mTbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oi5XLH4+; 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 b17si702240edy.99.2020.07.28.23.07.07; Tue, 28 Jul 2020 23:07:43 -0700 (PDT) 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=oi5XLH4+; 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 S1726286AbgG2GHG (ORCPT + 99 others); Wed, 29 Jul 2020 02:07:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:33462 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726047AbgG2GHF (ORCPT ); Wed, 29 Jul 2020 02:07:05 -0400 Received: from mail-oi1-f182.google.com (mail-oi1-f182.google.com [209.85.167.182]) (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 2DBEF206D4 for ; Wed, 29 Jul 2020 06:07:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596002825; bh=uuiZim+ifxA6Ag2XeK5X/HpYvVpSxfo8nFLbSaKmMQg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=oi5XLH4+ThyyvJjHpSHzQM1Nt3svCEO8J/kcQ6ACSfPpxiOZ1pj0aNQXMP7zW2Tns iVQU63f0XpIQrfSPJsWFCJ4spd4DAMRMz5iI97IpY2H5QlUsDQlmjnrTNINTltNkjS drEzDtJszfN4rUf6EHRHuYhE/KFOxnMMFECQ6MJg= Received: by mail-oi1-f182.google.com with SMTP id v13so3147948oiv.13 for ; Tue, 28 Jul 2020 23:07:05 -0700 (PDT) X-Gm-Message-State: AOAM533ZESJ32bmj0VT/GlXFsDqEaLY0WC+tpkG0XgpYDzOaN4cCHqYq 0zJEOXtxr5jtjUYDEy5JgHRP9tk4oRWYs8zV+aE= X-Received: by 2002:aca:afd0:: with SMTP id y199mr3524069oie.47.1596002824606; Tue, 28 Jul 2020 23:07:04 -0700 (PDT) MIME-Version: 1.0 References: <2a55b661-512b-9479-9fff-0f2e2a581765@candelatech.com> In-Reply-To: <2a55b661-512b-9479-9fff-0f2e2a581765@candelatech.com> From: Ard Biesheuvel Date: Wed, 29 Jul 2020 09:06:53 +0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Help getting aesni crypto patch upstream To: Ben Greear Cc: Linux Crypto Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, 29 Jul 2020 at 01:03, Ben Greear wrote: > > Hello, > > As part of my wifi test tool, I need to do decrypt AES on the CPU, and the only way this > performs well is to use aesni. I've been using a patch for years that does this, but > recently somewhere between 5.4 and 5.7, the API I've been using has been removed. > > Would anyone be interested in getting this support upstream? I'd be happy to pay for > the effort. > > Here is the patch in question: > > https://github.com/greearb/linux-ct-5.7/blob/master/wip/0001-crypto-aesni-add-ccm-aes-algorithm-implementation.patch > > Please keep me in CC, I'm not subscribed to this list. > Hi Ben, Recently, the x86 FPU handling was improved to remove the overhead of preserving/restoring of the register state, so the issue that this patch fixes may no longer exist. Did you try? In any case, according to the commit log on that patch, the problem is in the MAC generation, so it might be better to add a cbcmac(aes) implementation only, and not duplicate all the CCM boilerplate.