santuario-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Werner Dittmann <>
Subject Re: how to specify JCE provider for XML encryption
Date Sun, 23 Oct 2005 07:36:37 GMT

with XMLCipher you can only encrypt/decrypt XML documents
according to the W3c standard, using symmetric ciphers.

You try to use a public key cipher (assymmetric), such a cipher
is used to wrap the symmetric key.


Alexey wrote:
> Raul Benito <raul <at>> writes:
>>This way of setting the Provider using the JCEMapper, has some bugs(it
>>works for digesting/signing but not for crypt/decrypt).
>>Anyway I was thinking of deprecating/removing this methods.
>>So if more people use it please raise your hands, soon.
>>On 10/22/05, Werner Dittmann <Werner.Dittmann <at>> wrote:
>>>In WSS4J I use the follwing way to define the provider to XML-SEC:
>>>This static method sets the Id to use for SIgnature etc. For
>>>XMLCipher you must use different methods, look at that:
>>>if (provider == null) {
>>>    xmlCipher = XMLCipher.getInstance(symEncAlgo);
>>>else {
>>>    xmlCipher = XMLCipher.getProviderInstance(symEncAlgo, provider);
>>>If you like to specify a provider for XMLCipher you have
>>>to use a specific getInstance method - see above. The provider
>>>in this case is the provider id string, e.g. "BC" for
> I could not find a way to specify that, for example, algorithm defined as 
>, should be instantiated with IBMJCE's 
> cipher "RSA". I tried to modify config.xml according to DTD but it doesn't 
> seem to work. And I used the method XMLCipher.getProviderInstance(algorithm, 
> provider).
> Cheers,
> Alex

View raw message