linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Rabin Vincent <rabin.vincent@axis.com>
Cc: linux-crypto@vger.kernel.org
Subject: Re: [PATCH] crypto: tcrypt - Add mode to test specified algs
Date: Wed, 1 Feb 2017 22:03:48 +0800	[thread overview]
Message-ID: <20170201140348.GA32415@gondor.apana.org.au> (raw)
In-Reply-To: <20170123151304.GA20450@axis.com>

On Mon, Jan 23, 2017 at 04:13:04PM +0100, Rabin Vincent wrote:
> 
> That's what I thought so too, but that doesn't seem to be the case.  The
> mode=0 handling is this:
> 
> 	switch (m) {
> 	case 0:
> 		if (alg) {
> 			if (!crypto_has_alg(alg, type,
> 					    mask ?: CRYPTO_ALG_TYPE_MASK))
> 				ret = -ENOENT;
> 			break;
> 		}
> 
> 		for (i = 1; i < 200; i++)
> 			ret += do_test(NULL, 0, 0, i);
> 		break;
> 
> So, if alg= is specified, after first checking if the specified alg is
> present, it just goes ahead and runs all the tests.  I'm not sure what
> mode=0 alg=foo is meant to be used for.

You need to set the type and mask for it to work.

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

      reply	other threads:[~2017-02-01 14:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-18 16:25 Rabin Vincent
2017-01-23 14:14 ` Herbert Xu
2017-01-23 15:13   ` Rabin Vincent
2017-02-01 14:03     ` Herbert Xu [this message]

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=20170201140348.GA32415@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=rabin.vincent@axis.com \
    --subject='Re: [PATCH] crypto: tcrypt - Add mode to test specified algs' \
    /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

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).