From: Antoine Tenart <atenart@kernel.org>
To: Aleksander Jan Bajkowski <olek2@wp.pl>
Cc: herbert@gondor.apana.org.au, davem@davemloft.net,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] crypto: safexcel - Add support for authenc(hmac(md5),*) suites
Date: Tue, 3 Feb 2026 10:41:30 +0100 [thread overview]
Message-ID: <aYHCC-BiBKUXyUbd@kwain> (raw)
In-Reply-To: <20260202202203.124015-2-olek2@wp.pl>
On Mon, Feb 02, 2026 at 09:21:08PM +0100, Aleksander Jan Bajkowski wrote:
> This patch adds support for the following AEAD ciphersuites:
> - authenc(hmac(md5),cbc(aes))
> - authenc(hmac(md5),cbc(des)))
> - authenc(hmac(md5),cbc(des3_ede))
> - authenc(hmac(md5),rfc3686(ctr(aes)))
>
> This is enhanced version of the patch found in the mtk-openwrt-feeds repo.
Can you say how it was tested in the commit message?
> +static int safexcel_aead_md5_ctr_cra_init(struct crypto_tfm *tfm)
> +{
> + struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm);
> +
> + safexcel_aead_md5_cra_init(tfm);
> + ctx->mode = CONTEXT_CONTROL_CRYPTO_MODE_CTR_LOAD; /* override default */
> + return 0;
> +}
> +
> +struct safexcel_alg_template safexcel_alg_authenc_hmac_md5_ctr_aes = {
> + .type = SAFEXCEL_ALG_TYPE_AEAD,
> + .algo_mask = SAFEXCEL_ALG_AES | SAFEXCEL_ALG_MD5,
> + .alg.aead = {
> + .setkey = safexcel_aead_setkey,
> + .encrypt = safexcel_aead_encrypt,
> + .decrypt = safexcel_aead_decrypt,
> + .ivsize = CTR_RFC3686_IV_SIZE,
> + .maxauthsize = SHA1_DIGEST_SIZE,
MD5_DIGEST_SIZE?
> + .base = {
> + .cra_name = "authenc(hmac(md5),rfc3686(ctr(aes)))",
> + .cra_driver_name = "safexcel-authenc-hmac-md5-ctr-aes",
> + .cra_priority = SAFEXCEL_CRA_PRIORITY,
> + .cra_flags = CRYPTO_ALG_ASYNC |
> + CRYPTO_ALG_ALLOCATES_MEMORY |
> + CRYPTO_ALG_KERN_DRIVER_ONLY,
> + .cra_blocksize = 1,
> + .cra_ctxsize = sizeof(struct safexcel_cipher_ctx),
> + .cra_alignmask = 0,
> + .cra_init = safexcel_aead_md5_ctr_cra_init,
> + .cra_exit = safexcel_aead_cra_exit,
> + .cra_module = THIS_MODULE,
> + },
> + },
> +};
> +
> static int safexcel_aead_sha1_ctr_cra_init(struct crypto_tfm *tfm)
> {
> struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm);
Thanks!
Antoine
next prev parent reply other threads:[~2026-02-03 9:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-02 20:21 [PATCH 1/2] crypto: safexcel - Group authenc ciphersuites Aleksander Jan Bajkowski
2026-02-02 20:21 ` [PATCH 2/2] crypto: safexcel - Add support for authenc(hmac(md5),*) suites Aleksander Jan Bajkowski
2026-02-03 9:41 ` Antoine Tenart [this message]
2026-02-03 18:13 ` Aleksander Jan Bajkowski
2026-02-03 9:42 ` [PATCH 1/2] crypto: safexcel - Group authenc ciphersuites Antoine Tenart
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=aYHCC-BiBKUXyUbd@kwain \
--to=atenart@kernel.org \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=olek2@wp.pl \
/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