In TestOfDHKeyAgreements.java it says:

private void setUp() {
IKeyPairGenerator kpg = KeyPairGeneratorFactory.getInstance(Registry.DH_KPG);
 kpg.setup(new HashMap()); // use default values
 kpA = kpg.generate();
 kpB = kpg.generate();
}

With this setting the key agreement works, k1 is equal to k2. So far, no problem... But the Test is unrealistic, there are usually two completely independent classes - Server and
Client - so tried to simulate it with this code:

private void setUp() {
IKeyPairGenerator kpg = KeyPairGeneratorFactory.getInstance(Registry.DH_KPG); IKeyPairGenerator kpg2 = KeyPairGeneratorFactory.getInstance(Registry.DH_KPG);
 kpg.setup(new HashMap()); // use default values
 kpg2.setup(new HashMap()); // use default values
 kpA = kpg.generate();
 kpB = kpg2.generate();
}

BUT...
after this, the keys k1 and k2 are NOT equal!


What to do? Did I miss some kind of information?
I've searched everywhere, I've tried everything - for hours and days - and I never got it to work... That's why I think it is a bug, it just can't be, that two different parties can have the same object!?

Just let me know if You have any ideas!


Hopefully, David "Anthales" Roth

PS: Sorry for my English, I'm German ;-)


_______________________________________________
gnu-crypto-discuss mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnu-crypto-discuss

Reply via email to