On 5/3/2011 12:19 PM, Emanuele Cesena wrote:
It may be a stupid remark... anyway, OpenSSL uses key/iv "internally"
and exposes to the user passphrase and salt. Did you check that you have
not confused them?
I'm not using the command line openssl to produce the cipher.. the API
says nothing about a salt or a passphrase:
int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
ENGINE *impl, unsigned char *key, unsigned char *iv);
relevant parts of my openSSL code:
...
rc = EVP_EncryptInit_ex(&ctx, EVP_bf_cbc(), NULL, env_key, env_iv);
...
rc = EVP_EncryptUpdate(&ctx, out, &olen, in, ilen);
...
rc = EVP_EncryptFinal_ex(&ctx, out+olen, &olen);
where
EVP_CIPHER_CTX ctx;
unsigned char env_key[56];
unsigned char env_iv[8];
unsigned char *in, *out;
int rc, ilen, olen;
Thanks,
Tzvi
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html