Brent Putman wrote:
The real test would be if you get different behavior from this:Cipher xmlEncCiperAES = Cipher.getInstance("AES/CBC/ISO10126Padding", "BC"); versus this: Cipher xmlEncCiperAES = Cipher.getInstance("AES/CBC/ISO10126Padding");If the first works, but the latter doesn't (throws NoSuchPadding or NoSuchAlgorithm exceptions), then that answers the question.
I just tried and both work if you register BC as a provider with Sun's JDK 1.4.
It sounds as if you are using IBM's JDK though? If so, it may be a bug in their provider lookup mechanism. I would contact someone from IBM - they may be able to help debug this further.
If that proves to be the case: Note that you can specify a particular security provider to use in xmlsec for encryption/decryption with the XMLCipher#getProviderInstance variants instead of the usual XMLCipher#getInstance. That will let you get around whatever preferred order lookup behavior might be going on.
Yep, that's always an option if you have control over the code. --Sean
