Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

com.sun.crypto.provider.DHKeyPairGenerator

10 views
Skip to first unread message

Tomy

unread,
May 19, 2003, 8:32:29 AM5/19/03
to comp.lang.java.programmer
I'm using J2sdk 1.4.2 beta....
I do DHKeyExchnage with legacy server...
P and G parameters in key pair generation
are obtained from server. P has either 128, 192 or
256 bits....
Unfortunately com.sun.crypto.provider.DHKeyPairGenerator
insists that p should have more than 512 bits, less than 1024 bits
and its bit count should be divisible by 64....
Otherwise:
java.security.InvalidAlgorithmParameterException: Prime size must be
multiple of 64,
and can only range from 512 to 1024 (inclusive)
at com.sun.crypto.provider.DHKeyPairGenerator.initialize(DashoA6275)
at
java.security.KeyPairGenerator$Delegate.initialize(KeyPairGenerator.java:470
)
at java.security.KeyPairGenerator.initialize(KeyPairGenerator.java:341)
at Proba.main(Proba.java:68)

Does anyone knwo why this restricition is enforced??????
I've read through DH algorithm specification and have not
found it anywhere...

--
Tomy.
-----------------------
t.pet...@inet.hr


0 new messages