On Mon October 31 2011, Dave Thompson wrote:
> > From: owner-openssl-us...@openssl.org On Behalf Of Michael S. Zick
> > Sent: Sunday, 30 October, 2011 06:36
> 
> > On Sun October 30 2011, Ananthasayanan Kandiah wrote:
> > > #include <stdio.h>
> > > #include <string.h>
> > > #include <openssl/aes.h>
> > > #include <openssl/bio.h>
> > > 
> > > #define  KEY_SIZE 16
> 
> > Ask the compiler to help you:
> > 
> > mszick@wolf466:~/crypto$ gcc -Wall -E aes_test.c | grep "_SIZE"
> > 
> > aes_test.c:6:9: error: macro names must be identifiers
> >     unsigned char key_data[KEY_SIZE] = {
> >     AES_set_encrypt_key(key_data, KEY_SIZE * 8, &key);
> > 
> I don't know what happened to the message you got,
> 

My copy sent by the mailing list and processed by who-knows-what
before I got it had unicode buried in the whitespaces.

> but I got "#define  KEY_SIZE 16" which is a valid identifier,
>

That is the way my eyes read it also, but gcc -E wasn't showing
it as being expanded. (????)

Since I couldn't tell if what I got was what the OP was trying
to compile, I suggested the OP check its expansion themself.

> 
> compiled without error, and gave the symptom reported -- 
> because CRYPTO_cfb128_1_encrypt treats the length as bits 
>

My copy from the mailing list used: AES_cfb1_encrypt(...)
(Like the title of the post.)

Can't see how yours got like the above, unless you retyped
the post and your fingers just automatically corrected the 
function call being used.

> not bytes (apparently only used for AES and Camellia).
> 97 bits is 12 bytes plus 1 bit, and that 'extra' bit 
> is 0 and thus 'disappears'.
>

Yeah, I was thinking of suggesting "man ..." also.
Maybe I should have to have been complete.

Mike 
> Note these CFB-1 and CFB-8 modes don't update 'num', 
> so OP's line 68 is unnecessary (but harmless).
> CFB-block (16bytes=128bits) does.
> 
> 
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    openssl-users@openssl.org
> Automated List Manager                           majord...@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