On Thu, Apr 05, 2012, pkumarn wrote:

> 
> Can anyone please help me on this? This is really blocking me to proceed
> further
> 
> > 
> > #define KEY512  0
> > 
> > #if KEY512
> >     #define KEYLEN      64
> >     #define KEYBITS     512
> > #else
> >     #define KEYLEN  32
> >     #define KEYBITS 256
> > #endif
> > 
> >     if (AES_set_encrypt_key(kek, KEYBITS, &actx))
> >         printf("\n Error seeting AES key ");
> > 

Your problem is with the above line. KEYBITS is 512 which is invalid for an
AES key. You need the key bits of the kek, not the key being wrapped.

Looks like some of the assembly language optimised routines don't sanity check
the key length and return an error if it is invalid.

Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to