From: Vadim Fedorenko <vadim.fedorenko@linux.dev>
To: Herbert Xu <herbert@gondor.apana.org.au>,
Vadim Fedorenko <vadfed@meta.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
Martin KaFai Lau <martin.lau@linux.dev>,
Andrii Nakryiko <andrii@kernel.org>,
Alexei Starovoitov <ast@kernel.org>,
Mykola Lysenko <mykolal@fb.com>,
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
Date: Sun, 3 Dec 2023 20:00:48 +0000 [thread overview]
Message-ID: <84d81e44-b3eb-c4d0-aad3-6014fd7cef43@linux.dev> (raw)
In-Reply-To: <ZWqp4VF+4rX/plpX@gondor.apana.org.au>
On 02.12.2023 03:52, Herbert Xu wrote:
> 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,
Hi Herbert!
Thanks for the reminder. I have read v3 of your patchset and AFAIU only arc4
is affected right now. All other algorithms still have statesize=0, so should
work without any changes. I'll make a TODO note for myself to add state size
check in bpf_crypto part once different trees are merged during merge window.
Am I right that it only affects skcipher and AEAD crypto will not be changed?
Thanks,
Vadim
next prev parent reply other threads:[~2023-12-03 20:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-02 1:06 [PATCH bpf-next v7 1/3] bpf: make common crypto API for TC/XDP programs Vadim Fedorenko
2023-12-02 1:06 ` [PATCH bpf-next v7 2/3] bpf: crypto: add skcipher to bpf crypto Vadim Fedorenko
2023-12-02 3:52 ` Herbert Xu
2023-12-03 20:00 ` Vadim Fedorenko [this message]
2023-12-02 1:06 ` [PATCH bpf-next v7 3/3] selftests: bpf: crypto skcipher algo selftests Vadim Fedorenko
2023-12-03 10:59 ` Simon Horman
2023-12-03 18:43 ` Vadim Fedorenko
2023-12-05 1:28 ` Martin KaFai Lau
2023-12-02 1:48 ` [PATCH bpf-next v7 1/3] bpf: make common crypto API for TC/XDP programs Martin KaFai Lau
2023-12-03 19:02 ` Vadim Fedorenko
2023-12-04 23:08 ` Martin KaFai Lau
2023-12-03 10:57 ` Simon Horman
2023-12-03 19:08 ` Vadim Fedorenko
2023-12-05 20:19 ` kernel test robot
2023-12-05 21:15 ` kernel test robot
2023-12-06 5:56 ` Dan Carpenter
2023-12-07 12:14 ` Vadim Fedorenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=84d81e44-b3eb-c4d0-aad3-6014fd7cef43@linux.dev \
--to=vadim.fedorenko@linux.dev \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=kuba@kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=mykolal@fb.com \
--cc=netdev@vger.kernel.org \
--cc=vadfed@meta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).