$DH = Crypt::DH::GMP->new; $DH->g($g); $DH->p($p); $DH->priv_key($DH_private); $DH->generate_keys;