All of lore.kernel.org
 help / color / mirror / Atom feed
* Recent AEAD change: testmgr.c change needed?
@ 2015-08-19  9:48 Stephan Mueller
  2015-08-19 12:45 ` Herbert Xu
  0 siblings, 1 reply; 3+ messages in thread
From: Stephan Mueller @ 2015-08-19  9:48 UTC (permalink / raw)
  To: herbert; +Cc: linux-crypto

Hi Herbert,

The recent AEAD change seems to trigger a need to change something in 
testmgr.c. I ran my test tool trying to invoke all possible permutations of 
cra_name and cra_driver_name ciphers and got the following:

[11152.816179] alg: No test for gcm_base(ctr(aes-asm),ghash-generic) 
(gcm_base(ctr(aes-asm),ghash-generic))
[11154.278466] alg: No test for ccm_base(ctr(aes-asm),aes-asm) 
(ccm_base(ctr(aes-asm),aes-asm))
[11174.819535] alg: No test for gcm(aes-asm) (gcm_base(ctr(aes-asm),ghash-
clmulni))
[11174.819610] alg: No test for rfc4106(gcm(aes-asm)) 
(rfc4106(gcm_base(ctr(aes-asm),ghash-clmulni)))
[11174.819654] alg: No test for seqiv(rfc4106(gcm(aes-asm))) 
(seqiv(rfc4106(gcm_base(ctr(aes-asm),ghash-clmulni))))
[11192.292759] alg: No test for gcm_base(ctr-aes-aesni,ghash-clmulni) 
(gcm_base(ctr-aes-aesni,ghash-clmulni))
[11193.775049] alg: No test for ccm_base(ctr-aes-aesni,aes-aesni) 
(ccm_base(ctr-aes-aesni,aes-aesni))
[11213.936196] alg: No test for gcm(aes-aesni) (gcm_base(ctr(aes-aesni),ghash-
clmulni))
[11213.936308] alg: No test for rfc4106(gcm(aes-aesni)) 
(rfc4106(gcm_base(ctr(aes-aesni),ghash-clmulni)))
[11213.936418] alg: No test for seqiv(rfc4106(gcm(aes-aesni))) 
(seqiv(rfc4106(gcm_base(ctr(aes-aesni),ghash-clmulni))))
[11252.498078] alg: No test for seqiv(rfc4106(gcm(aes))) (seqiv(rfc4106-gcm-
aesni))
[11270.222200] alg: No test for gcm_base(ctr(aes-generic),ghash-generic) 
(gcm_base(ctr(aes-generic),ghash-generic))
[11271.602667] alg: No test for ccm_base(ctr(aes-generic),aes-generic) 
(ccm_base(ctr(aes-generic),aes-generic))


Albeit this listing is a nuisance in normal operation, it becomes fatal in 
fips=1 mode.

I guess we have to add all the listed ciphers into the big array in testmgr.c. 
If you concur, I could prepare a patch.

-- 
Ciao
Stephan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Recent AEAD change: testmgr.c change needed?
  2015-08-19  9:48 Recent AEAD change: testmgr.c change needed? Stephan Mueller
@ 2015-08-19 12:45 ` Herbert Xu
  2015-08-20  7:34   ` Herbert Xu
  0 siblings, 1 reply; 3+ messages in thread
From: Herbert Xu @ 2015-08-19 12:45 UTC (permalink / raw)
  To: Stephan Mueller; +Cc: linux-crypto

Hi Staphan:

On Wed, Aug 19, 2015 at 11:48:05AM +0200, Stephan Mueller wrote:
> 
> The recent AEAD change seems to trigger a need to change something in 
> testmgr.c. I ran my test tool trying to invoke all possible permutations of 
> cra_name and cra_driver_name ciphers and got the following:
> 
> [11152.816179] alg: No test for gcm_base(ctr(aes-asm),ghash-generic) 
> (gcm_base(ctr(aes-asm),ghash-generic))

This is a bug in gcm_base.  It should not use the driver name as
its cra_name.  I'll try to fix this.

> [11154.278466] alg: No test for ccm_base(ctr(aes-asm),aes-asm) 
> (ccm_base(ctr(aes-asm),aes-asm))
> [11174.819535] alg: No test for gcm(aes-asm) (gcm_base(ctr(aes-asm),ghash-
> clmulni))
> [11174.819610] alg: No test for rfc4106(gcm(aes-asm)) 
> (rfc4106(gcm_base(ctr(aes-asm),ghash-clmulni)))

Ditto.  gcm should also canonicalise aes-asm in its cra_name.

> [11174.819654] alg: No test for seqiv(rfc4106(gcm(aes-asm))) 
> (seqiv(rfc4106(gcm_base(ctr(aes-asm),ghash-clmulni))))

This is different.  We should definitely add tests for the IV
generators.  Obviously we can't test the randomness but we can
certainly test for correctness.  What we can do is reuse the
test vectors for the underlying algorithms.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Recent AEAD change: testmgr.c change needed?
  2015-08-19 12:45 ` Herbert Xu
@ 2015-08-20  7:34   ` Herbert Xu
  0 siblings, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2015-08-20  7:34 UTC (permalink / raw)
  To: Stephan Mueller; +Cc: linux-crypto

On Wed, Aug 19, 2015 at 08:45:50PM +0800, Herbert Xu wrote:
>
> > [11154.278466] alg: No test for ccm_base(ctr(aes-asm),aes-asm) 
> > (ccm_base(ctr(aes-asm),aes-asm))
> > [11174.819535] alg: No test for gcm(aes-asm) (gcm_base(ctr(aes-asm),ghash-
> > clmulni))
> > [11174.819610] alg: No test for rfc4106(gcm(aes-asm)) 
> > (rfc4106(gcm_base(ctr(aes-asm),ghash-clmulni)))
> 
> Ditto.  gcm should also canonicalise aes-asm in its cra_name.

I had a look and it seems that we need to fix ctr first to get
the canonicalised name.  So I'll revisit this after completing
the skcipher 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-08-20  7:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-19  9:48 Recent AEAD change: testmgr.c change needed? Stephan Mueller
2015-08-19 12:45 ` Herbert Xu
2015-08-20  7:34   ` Herbert Xu

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.