I am specifying the key and IV and using the same hex based string  for both.

On Thu, Sep 3, 2009 at 2:02 PM, Victor
Duchovni<[email protected]> wrote:
> On Thu, Sep 03, 2009 at 01:51:10PM -0500, Hazel John wrote:
>
>> Hi,
>> I need to encrypt simple strings to readable strings using the openssl
>> command line (opessl enc with the -a option to return readable
>> strings) and decrypt this in my code (c++/linux). I tried both the low
>> level aes and evp functions and couldn't get the results to match. Is
>> there a default padding used by the openssl command line? I tried
>> using the cbc alogorithm and padded it with the null char and thought
>> I can encrypt/decrypt correctly using openssl command line or my code,
>> I cannot get the encrypted output to match. I am using BIO to base64
>> encode/decode in my program and that part works well. I am trying to
>> match the encrypted output from my program to the encrypted output
>> using the same cipher with openssl command line and cannot get a
>> match.
>
> Are you using the same password-based key derivation function with the
> same "salt" to derive the encryption key and IV? The "magic" string
> and salt are prepended to the output of "openssl enc".
>
> --
>        Viktor.
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    [email protected]
> Automated List Manager                           [email protected]
>
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [email protected]
Automated List Manager                           [email protected]

Reply via email to