santuario-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Konstantinides <>
Subject AW: Patch for using RSA/ECB/OAEPWithSHA-256AndMGF1Padding
Date Mon, 24 Nov 2014 09:21:20 GMT
Hi Colm,

I opened and attached the patch.


Von: Colm O hEigeartaigh []
Gesendet: Freitag, 21. November 2014 12:33
Betreff: Re: Patch for using RSA/ECB/OAEPWithSHA-256AndMGF1Padding

Hi Thomas,

Yes, please log a JIRA and attach a patch.

On Thu, Nov 20, 2014 at 4:04 PM, Thomas Konstantinides <<>>

I was trying to use the version 2.0.2 of santuario to encrypt a XML document with an AES key
where the AES key itself should be encrypted using an RSA public key.

However at the moment it seems not possible to use the Cipher "RSA/ECB/OAEPWithSHA-256AndMGF1Padding"
as the encryption algorithm to encrypt the AES key. This algorithm is supposed to be supported
by every implementation of the Java 7 platform  (see
and is also provided by the SunJCE in Java 6 (

The attached patch fixes this behavior by considering that the digestAlgorithm given to the
method constructCipher() in XMLCipher can be SHA-256 as well.

Maybe someone can double check if the patch is really needed or if there's other possibilities
to get RSA/ECB/OAEPWithSHA-256AndMGF1Padding to work with version 2.0.2.

I'd rise a jira issue if you find that this is really a bug.

Thanks and regards,

Colm O hEigeartaigh

Talend Community Coder
View raw message