Title: Nachricht
Hi Werner,
 
It was a mistake, I forgot to enable jdk's full ecryption support.
 
BTW, how can I change JCE provider?.


De: Dittmann Werner [mailto:[EMAIL PROTECTED]
Enviado el: jue 27/01/2005 12:47
Para: Garzon Maldonado, Jesus Javier; [email protected]
Asunto: AW: Encryption with AES256

Javi,
 
seems we need to test AES a little more, check with latest
BC libs. Can you plase add a JIRA report. TIA.
 
Regards,
Werner
-----Urspr�ngliche Nachricht-----
Von: Garzon Maldonado, Jesus Javier [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 27. Januar 2005 10:40
An: [email protected]
Betreff: Encryption with AES256

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

Reply via email to