Hi,
Sorry to trouble you again. :)
I tried the padding approach that I described in my prev mail.
But still no luck. I am concerned about the block size given by the
EVP_CIPHER_block_size.
For example if I'm using 3-DES (block size=8)a buffer of size 64 to
call EVP_CipherUpdate and my plain text is of length let's say 117,
what should be the size of the pad for the last block?
Is it 11 (=N*64-117) OR 3 (=n*8 - 117)?
As I understood according to the specification
(http://www.w3.org/TR/xmlenc-core/ ) this should be 3.
So I should have a suffix of XX3 where X can be any value.
Then I have another problem.
This padding will fill-up from places 126-128. How should I fill places
from 117 to 126?
Also to disable the default padding in openssl I used
EVP_CIPHER_CTX_set_padding(&ctx, 0);
Is there any thing I have to do beyond this. Like setting certain
parameters in the EVP_CIPHER_CTX
Please clarify.
Thanks,
Kaushalye
Marek Marcola wrote:
Hello,
For encryption I can disable the padding in openssl and fill the data up
to a multiplication of a block size as per http://www.w3.org/TR/xmlenc-core.
The spec says a way to pad the block (section : Padding). So in the
decryption process I have to check the last byte to get the pad length
and then remove the pad from the decrypted result. If you are familiar
with this process can you verify my approach.
Exactly.
Best regards,
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager [EMAIL PROTECTED]