On Mon, Aug 10, 2009, MusicAndy wrote:

> 
> Since awaiting for a reply, I realised this was the case.
> 
> So the question is now, for different ciphers is the key length also
> different?  is it eight characters for des3?
> 

Is is 24 for des3. You can use EVP_MAX_KEY_LENGTH for the key and
EVP_MAX_IV_LENGTH for the iv. The EVP_BytesToKey() call uses the correct
lengths automatically.

> Also, how will i eventually add salt to this (specified in the command line
> as -salt but with no number present)
> 

You have to mimic the format used by the enc utility, see the docs. You read
the salt from the stream on decrypt and use that. If you need to encrypt you
generate a random salt with RAND_bytes().

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