> From: owner-openssl-us...@openssl.org On Behalf Of jeetendra gangele
> Sent: Wednesday, 09 January, 2013 01:28

>  when I use AES_ofb128_encrypt for decrpyting 2 bytes of data.
> Actually I have 18 bytes of data so 16 bytes I am decryting with CBC
> and 2 bytes with OFB mode.
> For this 2 bytes I am using IV as 16 bytes of decrypted data(means
> plaintext),but this 2 bytes data is not maching.

This is very weird. Do you mean you are encrypting and decrypting 
that way? If so it should work, but it's hugely nonstandard and 
you can't interoperate with anybody else. For 1 block, CBC 
is really salted ECB; you're not getting any real benefit.
Using a plaintext block as the IV for OFB is very likely to 
produce duplicates, and even predictable or choosable values.

If you want variable-length data and don't like the keystream modes 
(OFB, CFB, CTR), why not use CTS or XTS?

> what will be the key here I should use AES_set_encrypt_key() or
> AES_set_decrypt_key()?
> Does anybody have any idea?
> 
If your data is in fact encrypted in that weird and nonstandard way, 
and your decrypt is producing the wrong result, your decrypt is wrong.


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to