You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by "Colm O hEigeartaigh (JIRA)" <ji...@apache.org> on 2015/12/07 14:47:11 UTC

[jira] [Closed] (SANTUARIO-430) AES-GCM encryption/decryption does not work using STAX APIs and Java JCE

     [ https://issues.apache.org/jira/browse/SANTUARIO-430?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Colm O hEigeartaigh closed SANTUARIO-430.
-----------------------------------------

> AES-GCM encryption/decryption does not work using STAX APIs and Java JCE
> ------------------------------------------------------------------------
>
>                 Key: SANTUARIO-430
>                 URL: https://issues.apache.org/jira/browse/SANTUARIO-430
>             Project: Santuario
>          Issue Type: Bug
>    Affects Versions: Java 2.0.1
>            Reporter: Namrata Jaiswal
>            Assignee: Colm O hEigeartaigh
>            Priority: Blocker
>             Fix For: Java 2.0.6
>
>         Attachments: graycol.gif, graycol.gif
>
>
> When I use Stax APIs for encryption/decryption with IBM JDK, it gives me following error
> javax.xml.stream.XMLStreamException: org.apache.xml.security.exceptions.XMLSecurityException: Wrong parameter type: GCM expected
> Original Exception was java.security.InvalidAlgorithmParameterException: Wrong parameter type: GCM expected
> 	at org.apache.xml.security.stax.impl.XMLSecurityStreamWriter.chainProcessEvent(XMLSecurityStreamWriter.java:64)
> 	at org.apache.xml.security.stax.impl.XMLSecurityStreamWriter.outputOpenStartElement(XMLSecurityStreamWriter.java:83)
> 	at org.apache.xml.security.stax.impl.XMLSecurityStreamWriter.writeEndElement(XMLSecurityStreamWriter.java:215)
> 	at org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeEndElement(MTOMXMLStreamWriter.java:157)
> 	at org.apache.axiom.om.impl.util.OMSerializerUtil.serializeEndpart(OMSerializerUtil.java:57)
> 	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:973)
> 	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:965)
> 	at org.apache.axiom.om.impl.llom.OMSerializableImpl.serialize(OMSerializableImpl.java:125)
> 	at org.apache.axiom.om.impl.llom.OMSerializableImpl.serializeAndConsume(OMSerializableImpl.java:117)
> 	at org.apache.axiom.om.util.CopyUtils.reader2writer(CopyUtils.java:151)
> 	at com.ibm.b2b.enc.EncryptionTest.testEncryptionDecryptionAESGCMWithSTAX(EncryptionTest.java:138)
> 	at com.ibm.b2b.enc.EncryptionTest.main(EncryptionTest.java:200)
> Caused by: org.apache.xml.security.exceptions.XMLSecurityException: Wrong parameter type: GCM expected
> Original Exception was java.security.InvalidAlgorithmParameterException: Wrong parameter type: GCM expected
> 	at org.apache.xml.security.stax.impl.processor.output.AbstractEncryptOutputProcessor$AbstractInternalEncryptionOutputProcessor.init(AbstractEncryptOutputProcessor.java:190)
> 	at org.apache.wss4j.stax.impl.processor.output.EncryptOutputProcessor.processEvent(EncryptOutputProcessor.java:125)
> 	at org.apache.xml.security.stax.ext.AbstractOutputProcessor.processNextEvent(AbstractOutputProcessor.java:135)
> 	at org.apache.xml.security.stax.impl.OutputProcessorChainImpl.processEvent(OutputProcessorChainImpl.java:217)
> 	at org.apache.xml.security.stax.impl.XMLSecurityStreamWriter.chainProcessEvent(XMLSecurityStreamWriter.java:62)
> 	... 11 more
> Caused by: java.security.InvalidAlgorithmParameterException: Wrong parameter type: GCM expected
> 	at com.ibm.crypto.provider.AESGCMCipher.engineInit(Unknown Source)
> 	at javax.crypto.Cipher.a(Unknown Source)
> 	at javax.crypto.Cipher.a(Unknown Source)
> 	at javax.crypto.Cipher.init(Unknown Source)
> 	at javax.crypto.Cipher.init(Unknown Source)
> 	at org.apache.xml.security.stax.impl.processor.output.AbstractEncryptOutputProcessor$AbstractInternalEncryptionOutputProcessor.init(AbstractEncryptOutputProcessor.java:160)
> 	... 15 more
> But it works with bouncycastle.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)