Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Stephan Mueller <smueller@chronox.de>
To: linux-crypto@vger.kernel.org
Cc: "Struk, Tadeusz" <tadeusz.struk@intel.com>
Subject: Costs of asym self tests
Date: Mon, 16 May 2016 15:30:09 +0200	[thread overview]
Message-ID: <2344876.zyy5ByWqZi@tauon.atsec.com> (raw)

Hi,

albeit it makes most sense to have asym self tests in the test manager as we 
do right now, may I suggest some changes to it as follows. The issue I see is 
that asym operations are very expensive.

As we currently have RSA only, I can only refer to its implementation. But in 
general, all new-and-coming asym self tests should be assessed accordingly.

May I suggest to do the following:

- remove all self tests except the 2k tests. As the math works independent of 
the key size, testing one key size is sufficient to demonstrate that the math 
still works.

- If we booted in FIPS mode, and we have PKCS#1 compiled, then:

	* do not execute the raw RSA self test mentioned above

	* perform an enc/dec test using the kernel crypto API with a 2k key

	* if the asym key API is compiled, add a self test for siggen/ver

With this approach, I would see that we limit the impact of the self test to 
"normal" users as well as FIPS related use cases.

If agreed, I could offer to implement the changes.

Note, currently the self tests for RSA is not appropriate to allow the cipher 
in FIPS mode (i.e. the fips_allowed=1 flag is actually not correct in the 
current implementation).

Ciao
Stephan

                 reply	other threads:[~2016-05-16 13:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=2344876.zyy5ByWqZi@tauon.atsec.com \
    --to=smueller@chronox.de \
    --cc=linux-crypto@vger.kernel.org \
    --cc=tadeusz.struk@intel.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