All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Elliott, Robert (Servers)" <elliott@hpe.com>
To: Ard Biesheuvel <ardb@kernel.org>,
	"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>
Cc: "herbert@gondor.apana.org.au" <herbert@gondor.apana.org.au>,
	"ebiggers@kernel.org" <ebiggers@kernel.org>,
	"keescook@chromium.org" <keescook@chromium.org>,
	"jason@zx2c4.com" <jason@zx2c4.com>,
	"nikunj@amd.com" <nikunj@amd.com>
Subject: RE: [PATCH v4 3/3] crypto: aesgcm - Provide minimal library implementation
Date: Mon, 24 Oct 2022 16:21:52 +0000	[thread overview]
Message-ID: <MW5PR84MB1842E8E6C99E4C9F25A1E95EAB2E9@MW5PR84MB1842.NAMPRD84.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <20221024063052.109148-4-ardb@kernel.org>

> diff --git a/lib/crypto/aesgcm.c b/lib/crypto/aesgcm.c
> +static int __init libaesgcm_init(void)
...
> +		if (aesgcm_expandkey(&ctx, aesgcm_tv[i].key, aesgcm_tv[i].klen,
> +				     aesgcm_tv[i].clen - plen)) {
> +			WARN(1, "aesgcm_expandkey() failed on vector %d\n", i);
> +			return -EINVAL;
> +		}

Other self-test errors in lib/crypto (blake2s, chacha20poly1305,
and curve25519) are reported with pr_err. Could you add that in
addition to the WARNs?

Also, they return -ENODEV rather than -EINVAL on self-test failures,
like this:

static int __init blake2s_mod_init(void)
{
        if (!IS_ENABLED(CONFIG_CRYPTO_MANAGER_DISABLE_TESTS) &&
            WARN_ON(!blake2s_selftest()))
                return -ENODEV;
        return 0;
}



  reply	other threads:[~2022-10-24 21:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-24  6:30 [PATCH v4 0/3] crypto: Add AES-GCM implementation to lib/crypto Ard Biesheuvel
2022-10-24  6:30 ` [PATCH v4 1/3] crypto: move gf128mul library into lib/crypto Ard Biesheuvel
2022-10-25  5:26   ` Eric Biggers
2022-10-24  6:30 ` [PATCH v4 2/3] crypto: gf128mul - make gf128mul_lle time invariant Ard Biesheuvel
2022-10-24  6:30 ` [PATCH v4 3/3] crypto: aesgcm - Provide minimal library implementation Ard Biesheuvel
2022-10-24 16:21   ` Elliott, Robert (Servers) [this message]
2022-10-25  5:32   ` Eric Biggers
2022-10-25 12:48     ` Ard Biesheuvel

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=MW5PR84MB1842E8E6C99E4C9F25A1E95EAB2E9@MW5PR84MB1842.NAMPRD84.PROD.OUTLOOK.COM \
    --to=elliott@hpe.com \
    --cc=ardb@kernel.org \
    --cc=ebiggers@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=jason@zx2c4.com \
    --cc=keescook@chromium.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=nikunj@amd.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.