35363738394041
BigInteger x = helper.calculatePrivate(dhp, param.getRandom()); BigInteger y = helper.calculatePublic(dhp, x); return new AsymmetricCipherKeyPair( new DHPublicKeyParameters(y, dhp), new DHPrivateKeyParameters(x, dhp)); }
185186187188189190191192193194
initialised = true; } AsymmetricCipherKeyPair pair = engine.generateKeyPair(); DHPublicKeyParameters pub = (DHPublicKeyParameters)pair.getPublic(); DHPrivateKeyParameters priv = (DHPrivateKeyParameters)pair.getPrivate(); return new KeyPair(new JCEDHPublicKey(pub), new JCEDHPrivateKey(priv)); }
189190191192193194195196197198
38394041424344
x = helper.calculatePrivate(p, param.getRandom(), dhParams.getL()); y = helper.calculatePublic(p, dhParams.getG(), x); return new AsymmetricCipherKeyPair( new DHPublicKeyParameters(y, dhParams), new DHPrivateKeyParameters(x, dhParams)); }
x = helper.calculatePrivate(p, param.getRandom(), dhParams.getJ()); y = helper.calculatePublic(p, dhParams.getG(), x); return new AsymmetricCipherKeyPair( new DHPublicKeyParameters(y, dhParams), new DHPrivateKeyParameters(x, dhParams)); }
37383940414243