I'm attaching both XML files: one
created with Java libraries and one created with C++ libraries. Also,
certificate that was used to encrypt and decrypt both files is attached in both
JKS and .pfx formats. Password is "test".
Best
regards,
Milan
-----Original Message-----
From: Milan Tomic [mailto:[EMAIL PROTECTED]
Sent: Friday, October 01, 2004 11:22 AM
To: [EMAIL PROTECTED]
Subject: [java & c++] interoperability & encryptionHi,
I'm having problems with Apache XSEC Java & C++ interoperability when using encryption. When I encrypt some XML node in Java I can't decrypt it using C++ libraries, and the same happen when I encrypt using C++ and try to decrypt in Java. The only thing that is different in encrypted XML is random 3DES kek key that was generated. Have anyone else had this problem?
Thank you,
milan
<apache:RootElement xmlns:apache="http://www.apache.org/ns/#app1"> <xenc:EncryptedData xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" Type="http://www.w3.org/2001/04/xmlenc#Element"><xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc" /><ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <xenc:EncryptedKey xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"><xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/><xenc:CipherData><xenc:CipherValue >mjVYdyyk2cRN9moI4ifGFY8dTmeyK9cYQa/PkoJJ1RaLl+i1DK4q3J6RZjNfNIPf6S/jsvG1Ofwb qYO4KVPp78YxmhG2ADNA0WoKTZOLwXiwqBAVT9L0MMklW9y+DrqVAMwrY3xxDDQ33FgFOFPsEHwV yrVnmAK4MbUy2Qwj9iQ=</xenc:CipherValue></xenc:CipherData></xenc:EncryptedKey></ds:KeyInfo><xenc:CipherData><xenc:CipherValue>zadZ+G7s3KSJkskAI3HFJ6X2/Sp5k/4hP1SHdAIrAcvCi0dFiQwwZAfhT3YT1IrK9pcZdtDFnoJv 5UFaJirLQF1PqWhRVeuDFx1NHGd+mR7sQQfvw/kUC20mCJtKPMlA</xenc:CipherValue></xenc:CipherData></xenc:EncryptedData> </apache:RootElement>
test-self.jks
Description: Binary data
test-self.pfx
Description: application/pkcs12<apache:RootElement xmlns:apache="http://www.apache.org/ns/#app1"> <xenc:EncryptedData xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" Type="http://www.w3.org/2001/04/xmlenc#Element"> <xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/> <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <xenc:EncryptedKey xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"> <xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/> <xenc:CipherData> <xenc:CipherValue>8oxqYvaRsO9lM0pvbxAZ522imGXETq/bRP2uts5SHCm1tNwl+6LKgUcIAtDQT2yNykCdJEWoTrHx jo5IxE6W1dRW6fFRJ9n66lRxAYO3pdXhsGQbrEbbaJmwqKB/qVi0FsVO+kAkOSlRMuN02BERr6sG RQZCzlmFgX1hBEcdOUQ=</xenc:CipherValue> </xenc:CipherData> </xenc:EncryptedKey> </ds:KeyInfo> <xenc:CipherData> <xenc:CipherValue>Pv+/jKtIPDWFnAGPxfVTLmaPK3jGuThpH5kWmhptg8gGfzk1MKae8zzENMlyJH4w0a5hsev/GaH4 kQwJHCa89eU9P687QRBNCzg5OMp+ScKXqO4eKVHTXE4WRjx0ACdo</xenc:CipherValue> </xenc:CipherData> </xenc:EncryptedData> </apache:RootElement>