Trebor,

That particular error almost looks like you don't have the appropriate strong encryption policy file from Sun? ALthough if that were the case, I would not expect AES or 3DES to work either.

On Secret vs. Private - if you have no issue securely getting the Secret key (and I assume you are using it as a key wrap not a per message key), then secret key is fine.

If, on the other hand, you want to be able to pass a key over e-mail, or use a certificate or some other public form of key, you could probably use a Public/Private key pair.

Note that the actual encryption will still be using 3DES or AES - the public key is only used to encrypt the transport key.

Cheers,
        Berin

trebor iksrazal wrote:
I've been using SecretKey for a while now, due to that
I could never get PrivateKey to work. I get:


java.lang.SecurityException: Unsupported keysize or
algorithm parameters
        at javax.crypto.Cipher.init(DashoA6275)
        at
org.apache.xml.security.encryption.XMLCipher.encryptElement(XMLCipher.java:429)

This could be because I am using JKS as my keystore.
This is from Nov 26th cvs - a bit old I know.


In any event, in regards to the performance/security
tradeoff, could someone please opine about the
SecretKey/PrivateKey tradeoffs?


iksrazal

__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com


Reply via email to