Hi,
Refering to my previuos mail...

My Code is like this

----BEGIN CODE----

Initialize cipher ctx
EVP_CipherInit_ex(cipher_ctx, EVP_des_ede3_cbc(), NULL, NULL, NULL, 1)

while (true){//    until the input buffer is empty
  if(in_buf is empty) break;

  set the size of the output buffer out_buf
  EVP_CipherUpdate(cipher_ctx, out_buf, out_length, in_buf, in_length )
  remove the processed data from the input buffer   }
EVP_CipherFinal_ex(cipher_ctx, out_buf,out_length)

EVP_CIPHER_CTX_cleanup

----END CODE----

Do I have to repeat that code block three times before attaching the result to the xml doc
(for http://www.w3.org/2001/04/xmlenc#tripledes-cbc )?

Thanks,
Kaushalye
--- Begin Message ---
Hi,
I'm a new bee to xml security world.
Requirement:
I need to write a library to encrypt/sign xml. i.e. Something similar to xmlsec.
But my library is not based on DOM. It has another parsing mechanism.
Crypto library:
I 'm going to use openssl for this.
Question:
If I need to support Triple-DES as the initial step(http://www.w3.org/2001/04/xmlenc#tripledes-cbc), is there a straight forward way in Openssl?
I found that openssl has  cipher "EVP_des_ede3_cbc()".
If I send this cipher to EVP_CipherInit_ex() method and get the result using EVP_CipherUpdate() and EVP_CipherFinal_ex) calls, does that mean the resulting buffer has encrypted data? Or Do I have to send the resulted data three times(3 calls to Update) to comply with http://www.w3.org/2001/04/xmlenc#tripledes-cbc? (before encode and attach to the xml doc)
Please rectify me if Im wrong :)
Thanks,
Kaushalye

_______________________________________________
xmlsec mailing list
[email protected]
http://www.aleksey.com/mailman/listinfo/xmlsec


--- End Message ---
_______________________________________________
xmlsec mailing list
[email protected]
http://www.aleksey.com/mailman/listinfo/xmlsec

Reply via email to