Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.security.InvalidKeyException: Incompatible parameters

843811Nov 12 2009 — edited Nov 16 2009
I'm getting an exception after just following the tutorial at:
http://www.exampledepot.com/egs/javax.crypto/GenDhParams.html
http://www.exampledepot.com/egs/javax.crypto/KeyAgree.html
http://www.exampledepot.com/egs/javax.crypto/DesString.html

Is there a way to figure out why my parameters are incompatible?


java.lang.RuntimeException: java.security.InvalidKeyException: Incompatible parameters
at jexxus.common.Encryption.createEncryptionAlgorithm(Encryption.java:78)
at jexxus.common.Encryption.createEncryptionAlgorithm(Encryption.java:28)
at jexxus.server.ServerConnection.<init>(ServerConnection.java:43)
at jexxus.server.Server$1.run(Server.java:101)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.security.InvalidKeyException: Incompatible parameters
at com.sun.crypto.provider.DHKeyAgreement.engineDoPhase(DashoA13*..)
at javax.crypto.KeyAgreement.doPhase(DashoA13*..)
at jexxus.common.Encryption.createEncryptionAlgorithm(Encryption.java:70)
... 4 more


Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 14 2009
Added on Nov 12 2009
25 comments
1,629 views