/* Constructor used when someone already initiated the secure channel. * The Generator number and the prime modulus number has already been generated. * Param : * int generator : Previously Generated generator number. * int primeModulus : Previously Generated prime modulus number. */ public F3_NetSecureChannel(int generator, int primeModulus) { m_sharedKeyGenerator = new F3_DiffieHellman(generator, primeModulus); //Generate B with the other party generator and prime modulus. m_publicData = m_sharedKeyGenerator.GeneratePublicKey(); }
/* Constructor used to generate the Generator number and the prime modulus number. It should be used only by one end of the channel (ie : Server or client, not both). */ public F3_NetSecureChannel() { m_sharedKeyGenerator = new F3_DiffieHellman(); // Since we are the one initializing the talk for a secure channel... generate A. m_publicData = m_sharedKeyGenerator.GeneratePublicKey(); }