From: Roland Schmitt Date: 2006-10-16T16:42:53+09:00 Subject: Re: Encrypt large files with ruby openssl or ???? Hi, Damjan Rems schrieb: > I am sorry. It looks I have been asking wrong questions, because I > didn't know how or where to start. And this is basicly all I have got in > my directions. > > I need to encript and sign XML document as defined by XML security > standards. > > XML Signature Syntax, XML-DSIG, http://www.w3.org/2000/09/xmldsig# > Digest method, SHA-1, http://www.w3.org/2000/09/xmldsig#sha1 > Signature method, RSA-SHA-1, http://www.w3.org/2000/09/xmldsig#rsa-sha1 > > I thought this would be a lot easier. > > by TheR > > > > you can do all the basic cryptographic operations (sign, encrypt, hash) with ruby-openssl. But that is not enough, you also need a xml canonicalizer, defined by http://www.w3.org/TR/xml-c14n. There is nothing like this in pure ruby. One idea is using the libxml-ruby-bindings for this (http://rubyforge.org/projects/libxml/), as the libxml (http://xmlsoft.org/) supports canonicalisation. Another idea is implementing SWIG-bindings to something like xmlsec (http://www.aleksey.com/xmlsec/), which implements the XML security standards you refering to. Regards, Roland