Hi Douglas:

My first thought on this is that you're seeing padding, which may make the 
final data larger.

On January 22, 2010 08:54:58 am Douglas Gemignani wrote:
> Hello,
>
> I'm using PKCS#7 for generating an enveloped certificated, but after
> openssl generating a random TDES key and encrypts it with my pub exp,
> sometimes the resulting data is bigger than my module / prv exp.
>
> Something is wrong, this should never happen...
>
> There is my snippet
>
> p7 = PKCS7_new());
> PKCS7_set_type(p7, NID_pkcs7_enveloped);
> PKCS7_content_new( p7, NID_pkcs7_data);
> PKCS7_add_recipient(p7, *recipient);
> PKCS7_set_cipher(p7, EVP_des_ede3_cbc());
> p7bio = PKCS7_dataInit (p7,NULL);
> BIO_write(p7bio, Data, DataLenght);
> BIO_flush(p7bio);
> PKCS7_dataFinal(p7, p7bio);
>
> Thanks!
>
> []s
> Douglas Gemignani
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    [email protected]
> Automated List Manager                           [email protected]

-- 
Patrick Patterson
President and Chief PKI Architect,
Carillon Information Security Inc.
http://www.carillon.ca
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [email protected]
Automated List Manager                           [email protected]

Reply via email to