Help with assertion encryption ?

Tom Zeller tzeller at dragonacea.biz
Tue May 20 12:47:19 EDT 2014


>>I'm working on idp-distribution, and the encrypt assertions action
>>throws an exception, with Java 7 "Cannot find any provider supporting
>>AES/GCM/NoPadding" and with Java 8 "Unsupported parameter:
>>javax.crypto.spec.IvParameterSpec...".
>
> Are you sure it's that action? As Brent said, not sure why it would be
> attempting that algorithm at this point unless there's a stale file
> somewhere. I had very briefly listed GCM as an algorithm in a
> relying-party config while I was first sketching things out, but it
> shouldn't be there now.

Yes, I was sure it was EncryptAssertions. Snippets of the Java 7 and
Java 8 stack traces follow.

However, after updating OpenSAML this morning and revisiting, I don't
see these errors anymore, just debug log messages from the
AlgorithmRegistry that it "Cannot find any provider supporting
AES/GCM/NoPadding" etc, which seems fine.

I was probably just being tired.

2014-05-19 23:23:40.306 [ERROR] :
org.opensaml.xmlsec.encryption.support.Encrypter: Error initializing
cipher instance on XMLObject encryption
org.apache.xml.security.encryption.XMLEncryptionException: Cannot find
any provider supporting AES/GCM/NoPadding
at org.apache.xml.security.encryption.XMLCipher.constructCipher(XMLCipher.java:1548)
~[xmlsec-2.0.0.jar:2.0.0]
at org.apache.xml.security.encryption.XMLCipher.<init>(XMLCipher.java:318)
~[xmlsec-2.0.0.jar:2.0.0]
at org.apache.xml.security.encryption.XMLCipher.getInstance(XMLCipher.java:396)
~[xmlsec-2.0.0.jar:2.0.0]
at org.opensaml.xmlsec.encryption.support.Encrypter.encryptElement(Encrypter.java:457)
~[opensaml-xmlsec-api-3.0-SNAPSHOT.jar:na]
at org.opensaml.saml.saml2.encryption.Encrypter.encrypt(Encrypter.java:336)
[opensaml-saml-api-3.0-SNAPSHOT.jar:na]
at org.opensaml.saml.saml2.encryption.Encrypter.encrypt(Encrypter.java:251)
[opensaml-saml-api-3.0-SNAPSHOT.jar:na]
at org.opensaml.saml.saml2.profile.impl.EncryptAssertions.doExecute(EncryptAssertions.java:115)
[opensaml-saml-impl-3.0-SNAPSHOT.jar:na]

2014-05-19 23:30:35.483 [ERROR] :
org.opensaml.xmlsec.encryption.support.Encrypter: Error encrypting
XMLObject
java.security.InvalidAlgorithmParameterException: Unsupported
parameter: javax.crypto.spec.IvParameterSpec at 63f14c5f
at com.sun.crypto.provider.CipherCore.init(CipherCore.java:509)
~[sunjce_provider.jar:1.8.0]
at com.sun.crypto.provider.AESCipher.engineInit(AESCipher.java:339)
~[sunjce_provider.jar:1.8.0]
at javax.crypto.Cipher.implInit(Cipher.java:801) ~[na:1.8.0]
at javax.crypto.Cipher.chooseProvider(Cipher.java:859) ~[na:1.8.0]
at javax.crypto.Cipher.init(Cipher.java:1370) ~[na:1.8.0]
at javax.crypto.Cipher.init(Cipher.java:1301) ~[na:1.8.0]
at org.apache.xml.security.encryption.XMLCipher.encryptData(XMLCipher.java:1129)
~[xmlsec-2.0.0.jar:2.0.0]
at org.apache.xml.security.encryption.XMLCipher.encryptData(XMLCipher.java:1081)
~[xmlsec-2.0.0.jar:2.0.0]
at org.opensaml.xmlsec.encryption.support.Encrypter.encryptElement(Encrypter.java:467)
~[opensaml-xmlsec-api-3.0-SNAPSHOT.jar:na]
at org.opensaml.saml.saml2.encryption.Encrypter.encrypt(Encrypter.java:336)
[opensaml-saml-api-3.0-SNAPSHOT.jar:na]
at org.opensaml.saml.saml2.encryption.Encrypter.encrypt(Encrypter.java:251)
[opensaml-saml-api-3.0-SNAPSHOT.jar:na]
at org.opensaml.saml.saml2.profile.impl.EncryptAssertions.doExecute(EncryptAssertions.java:115)
[opensaml-saml-impl-3.0-SNAPSHOT.jar:na]


More information about the dev mailing list