Ok, will generate another patch for glue.c.  Since the asm doesn't verify the 
aadlen or taglen either (they have a constrained set of values as well), 
perhaps they should be verified by glue.c as well?

        - Tim

-----Original Message-----
From: Tim Chen [mailto:tim.c.c...@linux.intel.com] 
Sent: Friday, March 07, 2014 8:53 PM
To: McCaffrey, Timothy M
Cc: herb...@gondor.apana.org.au; linux-crypto@vger.kernel.org; James Guilford; 
Vinodh Gopal
Subject: RE: [PATCH 2/2] Crypto: Add support for 192 & 256 bit keys to AESNI 
RFC4106 - fixed whitespace

On Fri, 2014-03-07 at 19:40 -0600, McCaffrey, Timothy M wrote:
> You need to set the key length in the aes_key_expanded structure either 
> explicitly or use the aesni_set_key function.
> 
> The asm code expects only valid values in the structure (16, 24 or 32).
> 
> If the encrypt/decrypt is called without setting the key, you get garbage 
> (and an error in this case).  Perhaps the glue code needs to double check the 
> keysize before calling the asm code?
> 
>       - Tim
> 

Right, your new function actually will look for the keylen which was not
needed before.  

I think it will be a good idea to double check the keysize has valid
value before calling the asm code or in the asm code itself. 

Tim


N�����r��y����b�X��ǧv�^�)޺{.n�+����{�r��������ܨ}���Ơz�&j:+v�������zZ+��+zf���h���~����i���z��w���?�����&�)ߢf

Reply via email to