ws-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Hofer <>
Subject ECC in combination with WSS4J
Date Mon, 07 Jan 2013 15:11:27 GMT

I'm trying to use WSS4J in combination with elliptic curve cryptography. 
I installed BouncyCastle as provider.
The PublicKey is of type SHA256withECDSA stored in a JKS, created with 
the Java keytool (Java 7). The whole setup works if I switch to RSA 
keys, but when I'm using an EC key following exception occurs:

Caused by: unknown key type passed to RSA
     at javax.crypto.Cipher.implInit(
     at javax.crypto.Cipher.chooseProvider(
     at javax.crypto.Cipher.init(
     at javax.crypto.Cipher.init(

So far I found no way to set the algorithm used to create the key. The 
problem occurs when WSSecEncryptedKey.prepareInternal(...) tries to 
initialize the cipher

cipher.init(Cipher.WRAP_MODE, remoteCert.getPublicKey(), oaepParameterSpec);

Some hints or links to tutorials are really appreciated. So far I found 
nothing helpful.

Best regards
Thomas Hofer

View raw message