Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp1495139rdb; Fri, 1 Dec 2023 20:33:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IF25GAEExkyewGZ6HZIPMfK0fTytfNGn6U07cf9z2GO9BfopugAUmwtgetwv2gmgf46Uw3S X-Received: by 2002:a05:6808:6c3:b0:3b8:5c24:80da with SMTP id m3-20020a05680806c300b003b85c2480damr705660oih.58.1701491587778; Fri, 01 Dec 2023 20:33:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701491587; cv=none; d=google.com; s=arc-20160816; b=wYrCtSzx3I6qKfygDWWr3mMTAoIgndLznJVqo18WCYp/VQMHL6ll3XrhocPCEel9HI 4KykcdX79Xp/2Pwg6BDsbZ0cDcycpq0jF1IoXxyqMIb/xWKU07QL719qahyl54hrEwYT 34SvRAr+3abkAUqnBqXdHUoPcjIU7yBWnQclbSuZQubeNk/wxkOCvTpU3T2nqD2TjWHb laeP+LnCLMfHN5KRm0tt38OWwLTsTE1hJKUTj4MFK8A9+FVPa6kgsTpe6YE4bPQDWTbC Ky/uVQocJjKrYJWkHOAUXA5kxSnEO8dpJsXOQ/2itWspnwkniKGuS2qJPV496h3sT7HC DQFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=jtnwidzFadoioEULkAqrkigQ7qO8W59gyVPfT9yroTc=; fh=xz8ePmNW/9dYOX6stz1uilrZDbbFI3poTb2jin8BBB0=; b=ceqPAL6Sww88sQJ7BW50z2QYahyg9sZSldtm+4W6YPqpg4AyiGZOOE5cXC3Jsxucl4 H4IXQk8V7e/3GusSdu+Hydpk9d0im+V25shKIS+Qse7A3GTU9bosaVjK7aK0R4hUYF6S DzRWK5+m9qNLmWZ6UoRzcpX43fLLvt2L9ahELkLjdYhl82OitM3ZNPAAoG/sRIMgRAhk ydiuJR/yceEP5wcmb2mkRZ6tftuhQY+IsKIZiRJ64VjCzIbB8Pa1PZkTVhecE2T2+CKr xVFroiaev81WJkiQHTwzzk5CCfzqyaedIRGUyoE+JHmV4+tfAJSSXgC2O/qJ1Xn6qAnl Q/Ew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto+bounces-499-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-499-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id s8-20020a656448000000b005b95e508b6bsi4584497pgv.58.2023.12.01.20.33.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 20:33:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-499-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto+bounces-499-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-499-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 397D628145A for ; Sat, 2 Dec 2023 04:33:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F2CE22232B for ; Sat, 2 Dec 2023 04:33:06 +0000 (UTC) X-Original-To: linux-crypto@vger.kernel.org Received: from abb.hmeau.com (abb.hmeau.com [144.6.53.87]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD75E1B3; Fri, 1 Dec 2023 19:52:06 -0800 (PST) Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1r9H2m-006148-2O; Sat, 02 Dec 2023 11:51:53 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Sat, 02 Dec 2023 11:52:01 +0800 Date: Sat, 2 Dec 2023 11:52:01 +0800 From: Herbert Xu To: Vadim Fedorenko Cc: Vadim Fedorenko , Jakub Kicinski , Martin KaFai Lau , Andrii Nakryiko , Alexei Starovoitov , Mykola Lysenko , netdev@vger.kernel.org, linux-crypto@vger.kernel.org, bpf@vger.kernel.org Subject: Re: [PATCH bpf-next v7 2/3] bpf: crypto: add skcipher to bpf crypto Message-ID: References: <20231202010604.1877561-1-vadfed@meta.com> <20231202010604.1877561-2-vadfed@meta.com> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231202010604.1877561-2-vadfed@meta.com> On Fri, Dec 01, 2023 at 05:06:03PM -0800, Vadim Fedorenko wrote: > > +static int bpf_crypto_lskcipher_encrypt(void *tfm, const u8 *src, u8 *dst, > + unsigned int len, u8 *iv) > +{ > + return crypto_lskcipher_encrypt(tfm, src, dst, len, iv); > +} Please note that the API has been updated and the iv field is now the siv. For algorithms with a non-zero statesize, that means that the IV must be followed by enough memory to store the internal state, i.e., crypto_lskcipher_statesize(tfm). Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt