Decrypting an XML Document using Java

2010-08-20 Thread Arend van der Veen
Hi All, I have downloaded and installed xml-security-bin-1_4_3.zip. I am trying to use the simpleDecrypt sample program to decrypt an xml file. The EncryptionKey has been encrypted using a RSA 1.5 with X509 public/private key. The data is encrypted using aes-128-cbc. I am having trouble deter

Re: decrypting

2009-08-11 Thread Sean Mullan
You must enable the DocumentBuilderFactory to be namespace aware before parsing the document, add this line: factory.setNamespaceAware(true); --Sean Björn-Peter Tietjens wrote: Hi, I am encrypting xml using the sample code. But I have a problem decrypting it. I have a String representation

decrypting

2009-08-11 Thread Björn-Peter Tietjens
Hi, I am encrypting xml using the sample code. But I have a problem decrypting it. I have a String representation of the encrypted xml: see below I want to get a org.w3c.dom.Document representation by parsing that String and then decrypt the Document as in the sample code: public Document

Re: Still stuck with problem. Re: Problem decrypting elements

2007-12-03 Thread Brent Putman
rlyders wrote: Once the element has been encrypted and signed, the result is shown below. The web service that we are integrating with is not a full fledged SOAP WSDL web service, but rather it simply uses HTTPS and XML. Our existing XML document format where the XML Signature is enclosed by t

Re: Still stuck with problem. Re: Problem decrypting elements

2007-12-03 Thread rlyders
> > > It actually would find the Signature KeyInfo first (due to document > order) and incorrectly set that one as the EncryptedData's KeyInfo > member. And that would account for what you described. > > But like I said: you can't place the Signature there like that in

Re: Still stuck with problem. Re: Problem decrypting elements

2007-11-30 Thread Brent Putman
Brent Putman wrote: > > > I don't see how it could be getting the two KeyInfo's confused. All the > Apache EncryptedData.getKeyInfo() does is return a data member, it > doesn't do any searching or resolution. > > > > > Sound like you're trying to sign the Encrypte

Re: Still stuck with problem. Re: Problem decrypting elements

2007-11-30 Thread Brent Putman
Hi, I'm not completely clear on what you're doing, but it sounds like at a minimum you're perhaps doing something that's not legal. More below. rlyders wrote: > Brent, > Your comments lead me to debug the XMCipher java class to find out that my > enveloped Signature is confusing the default decry

Re: Still stuck with problem. Re: Problem decrypting elements

2007-11-30 Thread rlyders
to place and resolve EncryptedKey's but that's the default resolution > mechanism supported by the library). > > -- View this message in context: http://www.nabble.com/Problem-decrypting-elements-tf4699611.html#a14086621 Sent from the Apache XML - Security - Dev mailing list archive at Nabble.com.

Re: Still stuck with problem. Re: Problem decrypting elements

2007-10-31 Thread Wolfgang Freis
Thanks, Brent. Your response identified the problem. I hadn't added the KeyInfo to each EncryptedData, but only once. So, as long as there was only one encrypted element, it worked but threw an exception if there were more. Works like a charm now. Thanks again, Wolfgang > > 1) When encrypti

Re: Still stuck with problem. Re: Problem decrypting elements

2007-10-30 Thread Brent Putman
ry to handle resolving that. (If that's not the case then you should specify a non-null Key to XMLCipher#init(int, Key) when decrypting, possibly by resolving it yourself "manually" from the EncryptedData's KeyInfo or from other contextual information, e.g. knowledge of the sender

RE: Still stuck with problem. Re: Problem decrypting elements

2007-10-30 Thread Wolfgang Freis
Quoting "Lucas, Mike" <[EMAIL PROTECTED]>: > Hi Wolfgang, > > I'm not sure what's wrong with the sample, but I can tell that I've used > the APIs to successfully encrypt and decrypt SAML messages with: > a) the entire element and all sub-elements encrypted > b) several different elements encrypt

RE: Still stuck with problem. Re: Problem decrypting elements

2007-10-30 Thread Lucas, Mike
riginal Message- From: Wolfgang Freis [mailto:[EMAIL PROTECTED] Sent: October 30, 2007 1:47 PM To: security-dev@xml.apache.org Subject: Still stuck with problem. Re: Problem decrypting elements Hello all, I'm still stuck with this problem and don't know what else to try. I'm basica

Still stuck with problem. Re: Problem decrypting elements

2007-10-30 Thread Wolfgang Freis
y file was loaded and, as I said, the decryption > works fine when only one element of the XML is encrypted. I tried > decrypting by iterating over the NodeList returned from > getElementsByTagNameNS(namespaceURI, localName) and trying to just grab > the first item. Both generate the s

Problem decrypting elements

2007-10-26 Thread Wolfgang Freis
works fine when only one element of the XML is encrypted. I tried decrypting by iterating over the NodeList returned from getElementsByTagNameNS(namespaceURI, localName) and trying to just grab the first item. Both generate the same exception. From what I can see in the IDE is that the method dec

Re: Apache XML Security Encoding problem in encrypting/decrypting XML

2007-02-05 Thread Davanum Srinivas
Remember about new filename of your .jar ) Thanks guys for your help! Matthew View this message in context: Re: Apache XML Security Encoding problem in encrypting/decrypting XML Sent from the Apache XML - Security - Dev mailing list archive at Nabble.com. -- Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers

Re: Apache XML Security Encoding problem in encrypting/decrypting XML

2007-02-05 Thread mathew_pl
ything you have to do is to remove xmlsec-1.4.0.jar and replace it with xmlsec-1.4.0-utf_bug_fixed.jar (Remember about new filename of your .jar ) Thanks guys for your help! Matthew -- View this message in context: http://www.nabble.com/Apache-XML-Security-Encoding-problem-in-encrypting-decrypting-XML-tf314

Re: Apache XML Security Encoding problem in encrypting/decrypting XML

2007-02-05 Thread mathew_pl
ything you have to do is to remove xmlsec-1.4.0.jar and replace it with xmlsec-1.4.0-utf_bug_fixed.jar (Remember about new filename of your .jar ) Thanks guys for your help! Matthew -- View this message in context: http://www.nabble.com/Apache-XML-Security-Encoding-problem-in-encrypting-decrypting-XML-tf314

Re: Apache XML Security Encoding problem in encrypting/decrypting XML

2007-02-02 Thread mathew_pl
7;s. I admire the suggestions you gave me here and the time of replying. With your help I've solved the problem which broughts me to madness ;) Thanks a lot once again! Matthew -- View this message in context: http://www.nabble.com/Apache-XML-Security-Encoding-problem-in-encrypting-decrypting

Re: Apache XML Security Encoding problem in encrypting/decrypting XML

2007-02-02 Thread Lijun Liao
- I recieved the same error :( (of course source file was UTF-8 encoded). That would mean that something is going wrong with encrypting Document, not parsing a file. What's more interesting - encrypting and decrypting XML file which contains only 'ł' character(s) success, but

Re: Apache XML Security Encoding problem in encrypting/decrypting XML

2007-01-30 Thread Raul Benito
nswer. I can't check the international charset version of my JVM now, but i'll do it today, and say something here. That's another point to check out. -- Matthew -- View this message in context: http://www.nabble.com/Apache-XML-Security-Encoding-problem-in-encrypting-decrypting-XML-tf31

Re: Apache XML Security Encoding problem in encrypting/decrypting XML

2007-01-30 Thread mathew_pl
e. That's another point to check out. -- Matthew -- View this message in context: http://www.nabble.com/Apache-XML-Security-Encoding-problem-in-encrypting-decrypting-XML-tf3141650.html#a8707996 Sent from the Apache XML - Security - Dev mailing list archive at Nabble.com.

Re: Apache XML Security Encoding problem in encrypting/decrypting XML

2007-01-30 Thread Raul Benito
ed one textnode from: "Some simple text" > to "ąłęśóź" and tried to encrypt and decrypt it - I recieved the same error > :( (of course source file was UTF-8 encoded). That would mean that > something is going wrong with encrypting Document, not parsing a file. &

Re: Apache XML Security Encoding problem in encrypting/decrypting XML

2007-01-30 Thread Bradley Beddoes
ot;Some simple text" to "ąłęśóź" and tried to encrypt and decrypt it - I recieved the same error :( (of course source file was UTF-8 encoded). That would mean that something is going wrong with encrypting Document, not parsing a file. What's more interesting - encrypting and

Apache XML Security Encoding problem in encrypting/decrypting XML

2007-01-30 Thread mathew_pl
changed one textnode from: "Some simple text" to "ąłęśóź" and tried to encrypt and decrypt it - I recieved the same error :( (of course source file was UTF-8 encoded). That would mean that something is going wrong with encrypting Document, not parsing a file. What's more int

DO NOT REPLY [Bug 38584] - Decrypting an encrypted key produces a key with incorrect algorithm

2006-08-06 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bu

DO NOT REPLY [Bug 38584] - Decrypting an encrypted key produces a key with incorrect algorithm

2006-03-10 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bu

DO NOT REPLY [Bug 38584] - Decrypting an encrypted key produces a key with incorrect algorithm

2006-03-02 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bu

DO NOT REPLY [Bug 38584] New: - Decrypting an encrypted key produces a key with incorrect algorithm

2006-02-08 Thread bugzilla
gzilla/show_bug.cgi?id=38584 Summary: Decrypting an encrypted key produces a key with incorrect algorithm Product: Security Version: unspecified Platform: All OS/Version: other Status: NEW Severity:

RE: [c++] Decrypting rsa-oaep-mgf1p content

2004-10-14 Thread Milan Tomic
Title: Message       I've found explanation here:   http://www.w3.org/TR/xmlenc-core/#sec-RSA-OAEP

[c++] Decrypting rsa-oaep-mgf1p content

2004-10-14 Thread Milan Tomic
Title: [c++] Decrypting rsa-oaep-mgf1p content     When I try to decrypt content that was encrypted using it I got this error: "Currently only SHA-1 is supported for OAEP"     in: XENCAlgorithmHandlerDefault::doRSADecryptToSafeBuffer()     line: if (