RE: Problems with AES-CFB1

2011-11-02 Thread Dave Thompson
> From: owner-openssl-us...@openssl.org On Behalf Of Michael S. Zick > Sent: Tuesday, 01 November, 2011 09:15 > On Mon October 31 2011, Dave Thompson wrote: > > compiled without error, and gave the symptom reported -- > > because CRYPTO_cfb128_1_encrypt treats the length as bits > > > > My cop

Re: Problems with AES-CFB1

2011-11-02 Thread Ananthasayanan Kandiah
Yep, that solved it! That makes sense. Thankyou so much! On Wed, Nov 2, 2011 at 12:08 AM, re.est wrote: > Hello, > > I added *8 in length for both encrypt/decrypt call to make it bit length. > AES_cfb1_encrypt(data, ciphertext, length*8, &key, iv, &num, > AES_ENCRYPT); > > As you can see,

Re: Problems with AES-CFB1

2011-11-01 Thread re.est
Hello, I added *8 in length for both encrypt/decrypt call to make it bit length. AES_cfb1_encrypt(data, ciphertext, length*8, &key, iv, &num, AES_ENCRYPT); As you can see, cfb128_1 has uses bit as length in API void CRYPTO_cfb128_1_encrypt(const unsigned char *in, unsigned char *out,

Re: Problems with AES-CFB1

2011-11-01 Thread re.est
Hello, I added *8 in length for both encrypt/decrypt call to make it bit length. AES_cfb1_encrypt(data, ciphertext, length*8, &key, iv, &num, AES_ENCRYPT); CRYPTO_cfb128_1_encrypt accepts bit length unlike other CRYPTO_cfb128XX apis. On 11/01/2011 09:48 PM, Ananthasayanan Kandiah wrote

Re: Problems with AES-CFB1

2011-11-01 Thread Ananthasayanan Kandiah
Hi, I would be grateful if you could expand on this. I've tried simply placing the bit length for the AES_set_encrypt_key call and it still produces the same result. Thanks, Anantha On Tue, Nov 1, 2011 at 8:10 PM, re est wrote: > Hi, > > I have tried your code and replaced the length param wi

Re: Problems with AES-CFB1

2011-11-01 Thread Michael S. Zick
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 > > > #include > > > #include > > > #include > > > > > > #def

Re: Problems with AES-CFB1

2011-11-01 Thread re est
Hi, I have tried your code and replaced the length param with bit length (*8) instead. It worked. It seems that there are inconsistent with the usage of API. - re.est On Sun, Oct 30, 2011 at 4:55 PM, Ananthasayanan Kandiah wrote: > Hi, > > I'm trying to use AES-CFB1 through the "low-level" cal

RE: Problems with AES-CFB1

2011-10-31 Thread Dave Thompson
> 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 > > #include > > #include > > #include > > > > #define  KEY_SIZE 16 > Ask the compiler to help you: > > mszick@wol

Re: Problems with AES-CFB1

2011-10-30 Thread Michael S. Zick
On Sun October 30 2011, Ananthasayanan Kandiah wrote: > #include > #include > #include > #include > > #define  KEY_SIZE 16 > > int main(void) > { >     int            i; >     AES_KEY        key; >     BIO*        bio_out; > >     unsigned char key_data[KEY_SIZE] = { >         0xfe, 0xec, 0x

Problems with AES-CFB1

2011-10-30 Thread Ananthasayanan Kandiah
Hi, I'm trying to use AES-CFB1 through the "low-level" calls. Here's the example program I have come up with: #include #include #include #include #define KEY_SIZE 16 int main(void) { inti; AES_KEYkey; BIO*bio_out; unsigned char key_data[KEY_SIZE