All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcus Meissner <meissner@suse.de>
To: Stephan Mueller <smueller@chronox.de>
Cc: linux-crypto@vger.kernel.org
Subject: Re: tcrypt failing on hmac(crc32)
Date: Fri, 27 May 2016 11:19:32 +0200	[thread overview]
Message-ID: <20160527091932.GB924@suse.de> (raw)
In-Reply-To: <20160525130528.GA30676@suse.de>

On Wed, May 25, 2016 at 03:05:28PM +0200, Marcus Meissner wrote:
> On Wed, May 25, 2016 at 01:39:46PM +0200, Stephan Mueller wrote:
> > Am Mittwoch, 25. Mai 2016, 13:36:10 schrieb Marcus Meissner:
> > 
> > Hi Marcus,
> > 
> > > Hi,
> > > 
> > > On Wed, May 25, 2016 at 09:10:31AM +0200, Stephan Mueller wrote:
> > > > Am Mittwoch, 25. Mai 2016, 09:07:52 schrieb Marcus Meissner:
> > > > 
> > > > Hi Marcus,
> > > > 
> > > > > Hi,
> > > > > 
> > > > > when enabling the testmgr framework and FIPS in 4.6 and 4.4 and running
> > > > > "modprobe tcrypt"
> > > > > 
> > > >         }, {
> > > >         
> > > >                 .alg = "hmac(crc32)",
> > > >                 .test = alg_test_hash,
> > > > 
> > > > ...
> > > > 
> > > > fips_allowed = 1 missing?
> > > 
> > > The kernel was not in FIPS mode, and adding it did not help. :/
> > 
> > Sorry, I read FIPS and implied fips=1 :-)
> 
> I think we are running in a precondition
> 
>         ds = salg->digestsize;		// is CHKSUM_DIGEST_SIZE == 4 for CRC32
>         ss = salg->statesize;		// ? cant find it
>         alg = &salg->base; 		// base.cra_blocksize seems CHKSUM_BLOCKSIZE == 1
>         if (ds > alg->cra_blocksize ||
>             ss < alg->cra_blocksize)
>                 goto out_put_alg;
> 
> 	4 > 1 ... so EINVAL return.
> 
> If this is the case, hmac(crc32) might be kind of non-sensical?

And it actually is:

[  180.942532] hmac: blocksize check failed, ds=4, cra_blocksize=1, ss=4
[  180.942541] alg: hash: Failed to load transform for hmac(crc32): -2
[  180.989191] tcrypt: one or more tests failed!

Should I remove hmac(crc32) from the testmgr list?

Ciao, Marcus

  reply	other threads:[~2016-05-27  9:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-25  7:07 tcrypt failing on hmac(crc32) Marcus Meissner
2016-05-25  7:10 ` Stephan Mueller
2016-05-25 11:36   ` Marcus Meissner
2016-05-25 11:39     ` Stephan Mueller
2016-05-25 13:05       ` Marcus Meissner
2016-05-27  9:19         ` Marcus Meissner [this message]
2016-05-27  9:24           ` Stephan Mueller

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=20160527091932.GB924@suse.de \
    --to=meissner@suse.de \
    --cc=linux-crypto@vger.kernel.org \
    --cc=smueller@chronox.de \
    /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.