On Mon, Mar 17, 2003, Aonzo Emanuele wrote: > Hi, > I'm using Openssl to perform Encryption / Decryption operations in PKCS#7 > format. > I use the API set PKCS7_ ... > I have to set a particular IV for the interoperability with an external > product. What can I do? > Can I set an IV in PKCS_encode / decode or I have to use lower level api > like EVP_cipher... ? >
I don't think there is a clean way to do that. Setting a custom IV is a weird thing to have to do. The standard envelope encryption code genrates a random IV and encodes that in the envelopedData structure. The decryption code retrieves it from the structure. The IV generation and encoding is done all at once in PKCS7_dataInit(). You could hack that I suppose so the IV can be externally specified. Steve. -- Dr Stephen N. Henson. Core developer of the OpenSSL project: http://www.openssl.org/ Freelance consultant see: http://www.drh-consultancy.demon.co.uk/ Email: [EMAIL PROTECTED], PGP key: via homepage. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]