De: Ruchith Fernando [mailto:[EMAIL PROTECTED]
Enviado el: jue 27/01/2005 12:20
Para: Garzon Maldonado, Jesus Javier
Asunto: Re: Encryption with AES256
Hi,
You might be getting this problem because you are not
using the
"Unlimited Strength" Jurisdiction Policy Files
Those are
available at http://java.sun.com/products/jce/index-14.html
(Scroll
right down to teh bottom of the file)
Applying these policy files might
solve the problem.
Regards
- Ruchith
On Thu, 27 Jan 2005
10:40:00 +0100, Garzon Maldonado, Jesus Javier
<[EMAIL PROTECTED]>
wrote:
> Hello all,
>
> I'm using wss4j 1.0 (all
sources updated from CVS), JDK 1.5.0, JBoss 3.2.6
> and Windows
XP.
>
> I've successfully configured WSDoAllSender and
WSdoAllReceiver to sign and
> encrypt SOAP messages. However, when I try
to apply AES algorithm with 256
> bits key length it throws the following
exception:
>
>
org.apache.xml.security.encryption.XMLEncryptionException: Illegal key
size
> or default parameters
> Original Exception was
java.security.InvalidKeyException: Illegal key size
> or default
parameters
> at
org.apache.xml.security.encryption.XMLCipher.encryptData(Unknown Source)
>
at
>
org.apache.xml.security.encryption.XMLCipher.encryptElementContent(Unknown
>
Source)
> at org.apache.xml.security.encryption.XMLCipher.doFinal(Unknown
Source)
> at
>
org.apache.ws.security.message.WSEncryptBody.doEncryption(WSEncryptBody.java:515)
>
at
>
org.apache.ws.security.message.WSEncryptBody.doEncryption(WSEncryptBody.java:449)
>
at
>
org.apache.ws.security.message.WSEncryptBody.build(WSEncryptBody.java:299)
>
at
>
org.apache.ws.axis.security.WSDoAllSender.performENCRAction(WSDoAllSender.java:453)
>
[...]
>
> It seems to be a key initialization problem,
what should I do to solve it?.
>
> Bellow you can find
handler's definition in client-config.wsdd:
>
> <handler
name="DoSecuritySender"
>
type="java:org.apache.ws.axis.security.WSDoAllSender" >
>
>
<parameter name="user" value="wssecurity"/>
>
> <parameter
name="passwordCallbackClass" value="my_package.CPWCallback"/>
>
>
<parameter name="action" value="Encrypt Signature"/>
>
>
<parameter name="signaturePropFile" value="WEB-INF/wssecurity.properties"
/>
>
> <parameter name="encryptionSymAlgorithm"
>
value="http://www.w3.org/2001/04/xmlenc#aes256-cbc"
/>
>
> <parameter name="encryptionParts"
>
>
value="{Content}{http://bpc2/xml/schemas/MensajeAFU_FUS}MSGID"
/>
>
> <parameter name="signatureKeyIdentifier"
value="DirectReference" />
>
> <parameter
name="encryptionKeyIdentifier" value="X509KeyIdentifier" />
>
>
</handler>
> Thank you very much.
>
> Best
regards.
>
> Javi
Garz�n
